From d7dede2bdd47620b6f8ac8e3f72d454bac8c1005 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 28 Jan 2010 01:02:27 +0000 Subject: Remove the argument from EmitJumpTableInfo, because it doesn't need it. Move the X86 implementation of function body emission up to AsmPrinter::EmitFunctionBody, which works by calling the virtual EmitInstruction method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94716 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp') diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index 7fd17690f4..9e886ee6bb 100644 --- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -319,8 +319,6 @@ namespace { void printPredicateOperand(const MachineInstr *MI, unsigned OpNo, const char *Modifier); - - virtual bool runOnMachineFunction(MachineFunction &F) = 0; }; /// PPCLinuxAsmPrinter - PowerPC assembly printer, customized for Linux @@ -624,8 +622,7 @@ bool PPCLinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) { for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); I != E; ++I) { // Print a label for the basic block. - if (I != MF.begin()) - EmitBasicBlockStart(I); + EmitBasicBlockStart(I); // Print the assembly for the instructions. for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end(); @@ -639,7 +636,7 @@ bool PPCLinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) { DW->EndFunction(&MF); // Print out jump tables referenced by the function. - EmitJumpTableInfo(MF); + EmitJumpTableInfo(); // We didn't modify anything. return false; @@ -686,9 +683,7 @@ bool PPCDarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) { for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); I != E; ++I) { // Print a label for the basic block. - if (I != MF.begin()) { - EmitBasicBlockStart(I); - } + EmitBasicBlockStart(I); for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end(); II != IE; ++II) { // Print the assembly for the instruction. @@ -700,7 +695,7 @@ bool PPCDarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) { DW->EndFunction(&MF); // Print out jump tables referenced by the function. - EmitJumpTableInfo(MF); + EmitJumpTableInfo(); // We didn't modify anything. return false; -- cgit v1.2.3