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
This commit is contained in:
Chris Lattner 2006-10-05 21:40:14 +00:00
parent 39b5a21259
commit 9c78ecb511

View File

@ -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();
}