PIC16 does allow colon after MBB labels, simplify EmitBasicBlockStart.
authorChris Lattner <sabre@nondot.org>
Mon, 14 Sep 2009 03:15:54 +0000 (03:15 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 14 Sep 2009 03:15:54 +0000 (03:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81755 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp

index 65090adfc68248945db0edbc71443608ea7a7f04..decbea73197554122f66eab291bde01a384af8cb 100644 (file)
@@ -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.
     ///
index 6249cda695bece53969a22729562c5b138958158..265a837822ff6822327a0e81ce987e329400ca43 100644 (file)
@@ -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())
index 523c27cefe782476c83b68b57673edefe6318d84..795b79ad53b652cb00360d64c810214803493700 100644 (file)
@@ -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';
     }