| commit | 9c78ecb511ba6c8f53579ce60bcc4ef782eb831c | [log] [tgz] |
|---|---|---|
| author | Chris Lattner <sabre@nondot.org> | Thu Oct 05 21:40:14 2006 +0000 |
| committer | Chris Lattner <sabre@nondot.org> | Thu Oct 05 21:40:14 2006 +0000 |
| tree | f862baaa2fa2f1298687b377918e36a6252aacad | |
| parent | 39b5a2125922810233c0c1fd52a9621a979c8c19 [diff] |
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
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 5311b2c..96a481f 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp
@@ -857,7 +857,7 @@ << MBB->getNumber(); if (printColon) O << ':'; - if (printComment) + if (printComment && MBB->getBasicBlock()) O << '\t' << TAI->getCommentString() << MBB->getBasicBlock()->getName(); }