diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-28 01:02:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-28 01:02:27 +0000 |
commit | 14c38ec2afeaf25c53a50c2c65116aca8c889401 (patch) | |
tree | a8ed93037a7e6aaf38c701f3af60e8f86f81c30b /lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | |
parent | a2406190ca28dc5901dfe747849c8eda9c29d7ee (diff) |
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
Diffstat (limited to 'lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp')
-rw-r--r-- | lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp index 348c455472..72a2c3765a 100644 --- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp @@ -266,22 +266,11 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) { // instructions. EmitFunctionHeader(); - if (Subtarget->isTargetDarwin()) { - // If the function is empty, then we need to emit *something*. Otherwise, - // the function's label might be associated with something that it wasn't - // meant to be associated with. We emit a noop in this situation. - MachineFunction::iterator I = MF.begin(); - - if (++I == MF.end() && MF.front().empty()) - O << "\tnop\n"; - } - // Print out code for the function. 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 instruction. for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end(); @@ -289,6 +278,15 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) { printMachineInstruction(II); } + if (Subtarget->isTargetDarwin()) { + // If the function is empty, then we need to emit *something*. Otherwise, + // the function's label might be associated with something that it wasn't + // meant to be associated with. We emit a noop in this situation. + MachineFunction::iterator I = MF.begin(); + if (++I == MF.end() && MF.front().empty()) + O << "\tnop\n"; + } + if (MAI->hasDotTypeDotSizeDirective()) O << "\t.size " << *CurrentFnSym << ", .-" << *CurrentFnSym << "\n"; |