summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-13 18:25:37 +0000
committerChris Lattner <sabre@nondot.org>2009-09-13 18:25:37 +0000
commit1d04aa78f3efb00f02b757e06bb50f7472c2b354 (patch)
treed7fed66421ab935a32c6a1dbf2717029b0e57726 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parentde79e4fc2eb0c89cab6af356f350ca2e1ff6653d (diff)
downloadbcm5719-llvm-1d04aa78f3efb00f02b757e06bb50f7472c2b354.tar.gz
bcm5719-llvm-1d04aa78f3efb00f02b757e06bb50f7472c2b354.zip
replace printBasicBlockLabel with EmitBasicBlockStart,
now that printBasicBlockLabel is only used for starting a MBB. This allows elimination of a bunch of arguments. llvm-svn: 81684
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 3af6dbf65c9..c6339ebfc4d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1644,22 +1644,20 @@ MCSymbol *AsmPrinter::GetMBBSymbol(unsigned MBBID) const {
}
-/// printBasicBlockLabel - This method prints the label for the specified
-/// MachineBasicBlock
-void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
- bool printAlign, bool printColon,
- bool printComment) const {
- if (printAlign) {
- unsigned Align = MBB->getAlignment();
- if (Align)
- EmitAlignment(Log2_32(Align));
- }
+/// EmitBasicBlockStart - This method prints the label for the specified
+/// MachineBasicBlock, an alignment (if present) and a comment describing
+/// it if appropriate.
+void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock *MBB,
+ bool PrintColon) const {
+ if (unsigned Align = MBB->getAlignment())
+ EmitAlignment(Log2_32(Align));
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
- if (printColon)
+ if (PrintColon)
O << ':';
- if (printComment) {
+
+ if (VerboseAsm) {
if (const BasicBlock *BB = MBB->getBasicBlock())
if (BB->hasName()) {
O.PadToColumn(MAI->getCommentColumn());
@@ -1667,8 +1665,7 @@ void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
WriteAsOperand(O, BB, /*PrintType=*/false);
}
- if (printColon)
- EmitComments(*MBB);
+ EmitComments(*MBB);
}
}
OpenPOWER on IntegriCloud