summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-05 03:01:21 +0000
committerChris Lattner <sabre@nondot.org>2006-10-05 03:01:21 +0000
commita6a570e02fdf4a7a13e5b4b60d6c59bcdd7dafe0 (patch)
treea8e95d47f26bfbfef5fe3dbe1bba94083e5c98e0 /llvm/lib
parent38e2c8a0a236618870a8cd2a07c9615ae228be34 (diff)
downloadbcm5719-llvm-a6a570e02fdf4a7a13e5b4b60d6c59bcdd7dafe0.tar.gz
bcm5719-llvm-a6a570e02fdf4a7a13e5b4b60d6c59bcdd7dafe0.zip
Pass the MachineFunction into EmitJumpTableInfo.
llvm-svn: 30742
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp3
-rw-r--r--llvm/lib/Target/ARM/ARMAsmPrinter.cpp2
-rw-r--r--llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp2
-rw-r--r--llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp2
-rwxr-xr-xllvm/lib/Target/X86/X86ATTAsmPrinter.cpp9
-rwxr-xr-xllvm/lib/Target/X86/X86IntelAsmPrinter.cpp3
6 files changed, 13 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 247cceda7da..63d5f921820 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -183,7 +183,8 @@ void AsmPrinter::EmitConstantPool(unsigned Alignment, const char *Section,
/// EmitJumpTableInfo - Print assembly representations of the jump tables used
/// by the current function to the current output stream.
///
-void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI) {
+void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI,
+ MachineFunction &MF) {
const std::vector<MachineJumpTableEntry> &JT = MJTI->getJumpTables();
if (JT.empty()) return;
const TargetData *TD = TM.getTargetData();
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
index 4c0d187c7bc..d0005a8dd2f 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -117,7 +117,7 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
EmitConstantPool(MF.getConstantPool());
// Print out jump tables referenced by the function
- EmitJumpTableInfo(MF.getJumpTableInfo());
+ EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
// Print out labels for the function.
const Function *F = MF.getFunction();
diff --git a/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp b/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
index 265f8ae4a21..3448f3c4739 100644
--- a/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
+++ b/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
@@ -162,7 +162,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
EmitConstantPool(MF.getConstantPool());
// Print out jump tables referenced by the function
- EmitJumpTableInfo(MF.getJumpTableInfo());
+ EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
// Print out labels for the function.
const Function *F = MF.getFunction();
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index b7e7f2878e4..bba9d75558f 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -475,7 +475,7 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
}
// Print out jump tables referenced by the function.
- EmitJumpTableInfo(MF.getJumpTableInfo());
+ EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
// Emit post-function debug information.
DW.EndFunction();
diff --git a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
index 85ba0f40e61..eef95d935d1 100755
--- a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
@@ -126,10 +126,11 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
}
}
- // 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());
+ // Print out jump tables referenced by the function.
+
+ // Mac OS X requires that the jump table follow the function, so that the jump
+ // table is part of the same atom that the function is in.
+ EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
if (TAI->hasDotTypeDotSizeDirective())
O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
diff --git a/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp b/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
index 4e833bdd3da..a7d1351e7a0 100755
--- a/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
@@ -85,6 +85,9 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
}
}
+ // Print out jump tables referenced by the function.
+ EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
+
O << CurrentFnName << "\tendp\n";
// We didn't modify anything.
OpenPOWER on IntegriCloud