summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-28 01:02:27 +0000
committerChris Lattner <sabre@nondot.org>2010-01-28 01:02:27 +0000
commit94a946cac4de71f964278f5e4a4dea40e6398353 (patch)
treeee0b234d3806ae9923c8879ad63a1d8e5141e262 /llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
parentbcbdaea7037c35793d4275347e46b2dc30db285c (diff)
downloadbcm5719-llvm-94a946cac4de71f964278f5e4a4dea40e6398353.tar.gz
bcm5719-llvm-94a946cac4de71f964278f5e4a4dea40e6398353.zip
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. llvm-svn: 94716
Diffstat (limited to 'llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index 348c455472c..72a2c3765ac 100644
--- a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/llvm/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";
OpenPOWER on IntegriCloud