PIC16 does allow colon after MBB labels, simplify EmitBasicBlockStart.

llvm-svn: 81755
This commit is contained in:
Chris Lattner 2009-09-14 03:15:54 +00:00
parent 11b2fc9ea4
commit 4dc75de733
3 changed files with 4 additions and 8 deletions

View File

@ -353,8 +353,7 @@ namespace llvm {
/// EmitBasicBlockStart - This method prints the label for the specified /// EmitBasicBlockStart - This method prints the label for the specified
/// MachineBasicBlock, an alignment (if present) and a comment describing /// MachineBasicBlock, an alignment (if present) and a comment describing
/// it if appropriate. /// it if appropriate.
void EmitBasicBlockStart(const MachineBasicBlock *MBB, void EmitBasicBlockStart(const MachineBasicBlock *MBB) const;
bool printColon = true) const;
protected: protected:
/// EmitZeros - Emit a block of zeros. /// EmitZeros - Emit a block of zeros.
/// ///

View File

@ -1648,15 +1648,12 @@ MCSymbol *AsmPrinter::GetMBBSymbol(unsigned MBBID) const {
/// EmitBasicBlockStart - This method prints the label for the specified /// EmitBasicBlockStart - This method prints the label for the specified
/// MachineBasicBlock, an alignment (if present) and a comment describing /// MachineBasicBlock, an alignment (if present) and a comment describing
/// it if appropriate. /// it if appropriate.
void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock *MBB, void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock *MBB) const {
bool PrintColon) const {
if (unsigned Align = MBB->getAlignment()) if (unsigned Align = MBB->getAlignment())
EmitAlignment(Log2_32(Align)); EmitAlignment(Log2_32(Align));
GetMBBSymbol(MBB->getNumber())->print(O, MAI); GetMBBSymbol(MBB->getNumber())->print(O, MAI);
O << ':';
if (PrintColon)
O << ':';
if (VerboseAsm) { if (VerboseAsm) {
if (const BasicBlock *BB = MBB->getBasicBlock()) if (const BasicBlock *BB = MBB->getBasicBlock())

View File

@ -98,7 +98,7 @@ bool PIC16AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print a label for the basic block. // Print a label for the basic block.
if (I != MF.begin()) { if (I != MF.begin()) {
EmitBasicBlockStart(I, false); EmitBasicBlockStart(I);
O << '\n'; O << '\n';
} }