summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-05 21:40:14 +0000
committerChris Lattner <sabre@nondot.org>2006-10-05 21:40:14 +0000
commit9c78ecb511ba6c8f53579ce60bcc4ef782eb831c (patch)
treef862baaa2fa2f1298687b377918e36a6252aacad /lib/CodeGen/AsmPrinter.cpp
parent39b5a2125922810233c0c1fd52a9621a979c8c19 (diff)
downloadllvm-9c78ecb511ba6c8f53579ce60bcc4ef782eb831c.tar.gz
llvm-9c78ecb511ba6c8f53579ce60bcc4ef782eb831c.tar.bz2
llvm-9c78ecb511ba6c8f53579ce60bcc4ef782eb831c.tar.xz
Don't crash if an MBB doesn't have an LLVM BB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30757 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 5311b2c5cb..96a481fc84 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -857,7 +857,7 @@ void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
<< MBB->getNumber();
if (printColon)
O << ':';
- if (printComment)
+ if (printComment && MBB->getBasicBlock())
O << '\t' << TAI->getCommentString() << MBB->getBasicBlock()->getName();
}