From 4dc75de733da45b43667cecfc0b849eda453e5f5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 14 Sep 2009 03:15:54 +0000 Subject: [PATCH] PIC16 does allow colon after MBB labels, simplify EmitBasicBlockStart. llvm-svn: 81755 --- llvm/include/llvm/CodeGen/AsmPrinter.h | 3 +-- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 7 ++----- llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h index 65090adfc682..decbea731975 100644 --- a/llvm/include/llvm/CodeGen/AsmPrinter.h +++ b/llvm/include/llvm/CodeGen/AsmPrinter.h @@ -353,8 +353,7 @@ namespace llvm { /// EmitBasicBlockStart - This method prints the label for the specified /// MachineBasicBlock, an alignment (if present) and a comment describing /// it if appropriate. - void EmitBasicBlockStart(const MachineBasicBlock *MBB, - bool printColon = true) const; + void EmitBasicBlockStart(const MachineBasicBlock *MBB) const; protected: /// EmitZeros - Emit a block of zeros. /// diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 6249cda695be..265a837822ff 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1648,15 +1648,12 @@ MCSymbol *AsmPrinter::GetMBBSymbol(unsigned MBBID) const { /// 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 { +void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock *MBB) const { if (unsigned Align = MBB->getAlignment()) EmitAlignment(Log2_32(Align)); GetMBBSymbol(MBB->getNumber())->print(O, MAI); - - if (PrintColon) - O << ':'; + O << ':'; if (VerboseAsm) { if (const BasicBlock *BB = MBB->getBasicBlock()) diff --git a/llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp b/llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp index 523c27cefe78..795b79ad53b6 100644 --- a/llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp +++ b/llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp @@ -98,7 +98,7 @@ bool PIC16AsmPrinter::runOnMachineFunction(MachineFunction &MF) { // Print a label for the basic block. if (I != MF.begin()) { - EmitBasicBlockStart(I, false); + EmitBasicBlockStart(I); O << '\n'; }