diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2006-08-28 22:14:16 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2006-08-28 22:14:16 +0000 |
| commit | 00884b51c5ea8326c1cf035416967d5e26afd678 (patch) | |
| tree | 4f885335bf986a9613b3f87eca25a520e3a31300 /llvm/lib | |
| parent | 86d61a5c0261ee59cc710082abc34760bd2fb9c9 (diff) | |
| download | bcm5719-llvm-00884b51c5ea8326c1cf035416967d5e26afd678.tar.gz bcm5719-llvm-00884b51c5ea8326c1cf035416967d5e26afd678.zip | |
On Mac, print jump table entries after the function to work around a linker issue.
llvm-svn: 29946
Diffstat (limited to 'llvm/lib')
| -rwxr-xr-x | llvm/lib/Target/X86/X86ATTAsmPrinter.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp index 10a2c89fbac..76e137e75b2 100755 --- a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp +++ b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp @@ -38,9 +38,6 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) { // Print out constants referenced by the function EmitConstantPool(MF.getConstantPool()); - // Print out jump tables referenced by the function - EmitJumpTableInfo(MF.getJumpTableInfo()); - // Print out labels for the function. const Function *F = MF.getFunction(); switch (F->getLinkage()) { @@ -98,6 +95,12 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) { printMachineInstruction(II); } } + + // Print out jump tables referenced by the function + // Mac OS X requires at least one non-local (e.g. L1) labels before local + // lables that are used in jump table expressions (e.g. LBB1_1-LJT1_0). + EmitJumpTableInfo(MF.getJumpTableInfo()); + if (HasDotTypeDotSizeDirective) O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n"; |

