diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 5311b2c5cbb..96a481fc846 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(); }