summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-20 07:24:05 +0000
committerChris Lattner <sabre@nondot.org>2010-01-20 07:24:05 +0000
commitf8dcf784a7d05d77880a0638b7557d60b7f57e4b (patch)
tree569798ae085f22a84efd07b857b28d9ee11f669b /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent4c8b1824f0958db75bf24e358330bdd043f93f35 (diff)
downloadbcm5719-llvm-f8dcf784a7d05d77880a0638b7557d60b7f57e4b.tar.gz
bcm5719-llvm-f8dcf784a7d05d77880a0638b7557d60b7f57e4b.zip
emit basic block labels with mcstreamer.
llvm-svn: 93993
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index bb0cb181909..660955a5f44 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1643,14 +1643,12 @@ void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock *MBB) const {
// forward references to labels without knowing what their numbers
// will be.
if (MBB->hasAddressTaken()) {
- O << *GetBlockAddressSymbol(MBB->getBasicBlock()->getParent(),
- MBB->getBasicBlock());
- O << ':';
+ const BasicBlock *BB = MBB->getBasicBlock();
+ OutStreamer.EmitLabel(GetBlockAddressSymbol(BB->getParent(), BB));
if (VerboseAsm) {
O.PadToColumn(MAI->getCommentColumn());
- O << MAI->getCommentString() << " Address Taken";
+ O << MAI->getCommentString() << " Address Taken" << '\n';
}
- O << '\n';
}
// Print the main label for the block.
@@ -1658,9 +1656,7 @@ void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock *MBB) const {
if (VerboseAsm)
O << MAI->getCommentString() << " BB#" << MBB->getNumber() << ':';
} else {
- O << *GetMBBSymbol(MBB->getNumber()) << ':';
- if (!VerboseAsm)
- O << '\n';
+ OutStreamer.EmitLabel(GetMBBSymbol(MBB->getNumber()));
}
// Print some comments to accompany the label.
OpenPOWER on IntegriCloud