summaryrefslogtreecommitdiff
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
commit213168ba469703a186d060281e587d828878aa75 (patch)
treee2159ef2de54d6f962fa6051b40f8a16d69347e6
parent043c4e5c1d012c8131c7f2fa27a4def32740c42f (diff)
downloadllvm-213168ba469703a186d060281e587d828878aa75.tar.gz
llvm-213168ba469703a186d060281e587d828878aa75.tar.bz2
llvm-213168ba469703a186d060281e587d828878aa75.tar.xz
emit basic block labels with mcstreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93993 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp12
-rw-r--r--test/CodeGen/X86/2008-12-19-EarlyClobberBug.ll2
-rw-r--r--test/CodeGen/X86/loop-hoist.ll2
3 files changed, 6 insertions, 10 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index bb0cb18190..660955a5f4 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/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.
diff --git a/test/CodeGen/X86/2008-12-19-EarlyClobberBug.ll b/test/CodeGen/X86/2008-12-19-EarlyClobberBug.ll
index 13a9080c14..a6cabc4fd3 100644
--- a/test/CodeGen/X86/2008-12-19-EarlyClobberBug.ll
+++ b/test/CodeGen/X86/2008-12-19-EarlyClobberBug.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s
+; RUN: llc < %s -mtriple=i386-apple-darwin -asm-verbose=0 | FileCheck %s
; PR3149
; Make sure the copy after inline asm is not coalesced away.
diff --git a/test/CodeGen/X86/loop-hoist.ll b/test/CodeGen/X86/loop-hoist.ll
index b52066dac6..b9008e5e30 100644
--- a/test/CodeGen/X86/loop-hoist.ll
+++ b/test/CodeGen/X86/loop-hoist.ll
@@ -4,7 +4,7 @@
; CHECK: _foo:
; CHECK: L_Arr$non_lazy_ptr
-; CHECK: LBB1_1: ## %cond_true
+; CHECK: LBB1_1:
@Arr = external global [0 x i32] ; <[0 x i32]*> [#uses=1]