forked from OSchip/llvm-project
[CodeGen] Use generic printAsOperand machinery instead of hand rolling it
We already know how to properly print out basic blocks in printAsOperand, we should not roll it ourselves in AsmPrinter::EmitBasicBlockStart. No functionality change is intended. llvm-svn: 256413
This commit is contained in:
parent
498f558fcf
commit
11234ed7d3
|
@ -2503,9 +2503,13 @@ void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock &MBB) const {
|
|||
|
||||
// Print some verbose block comments.
|
||||
if (isVerbose()) {
|
||||
if (const BasicBlock *BB = MBB.getBasicBlock())
|
||||
if (BB->hasName())
|
||||
OutStreamer->AddComment("%" + BB->getName());
|
||||
if (const BasicBlock *BB = MBB.getBasicBlock()) {
|
||||
if (BB->hasName()) {
|
||||
BB->printAsOperand(OutStreamer->GetCommentOS(),
|
||||
/*PrintType=*/false, BB->getModule());
|
||||
OutStreamer->GetCommentOS() << '\n';
|
||||
}
|
||||
}
|
||||
emitBasicBlockLoopComments(MBB, LI, *this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue