summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-12-25 09:37:26 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-12-25 09:37:26 +0000
commit11234ed7d34730117fec170c52f656246a46463a (patch)
treecc3989b5cb0a9b89b12011837f30270ad28a6371 /llvm/lib/CodeGen/AsmPrinter
parent498f558fcf63015f0ffe2d8f8faa28001541ff2d (diff)
downloadbcm5719-llvm-11234ed7d34730117fec170c52f656246a46463a.tar.gz
bcm5719-llvm-11234ed7d34730117fec170c52f656246a46463a.zip
[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
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 73149441935..be7eafbeb83 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -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);
}
OpenPOWER on IntegriCloud