mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Pass the MachineFunction into EmitJumpTableInfo.
llvm-svn: 30742
This commit is contained in:
parent
75e572ab20
commit
068190eb91
@ -161,7 +161,7 @@ namespace llvm {
|
|||||||
/// EmitJumpTableInfo - Print assembly representations of the jump tables
|
/// EmitJumpTableInfo - Print assembly representations of the jump tables
|
||||||
/// used by the current function to the current output stream.
|
/// used by the current function to the current output stream.
|
||||||
///
|
///
|
||||||
void EmitJumpTableInfo(MachineJumpTableInfo *MJTI);
|
void EmitJumpTableInfo(MachineJumpTableInfo *MJTI, MachineFunction &MF);
|
||||||
|
|
||||||
/// EmitSpecialLLVMGlobal - Check to see if the specified global is a
|
/// EmitSpecialLLVMGlobal - Check to see if the specified global is a
|
||||||
/// special global used by LLVM. If so, emit it and return true, otherwise
|
/// special global used by LLVM. If so, emit it and return true, otherwise
|
||||||
|
@ -183,7 +183,8 @@ void AsmPrinter::EmitConstantPool(unsigned Alignment, const char *Section,
|
|||||||
/// EmitJumpTableInfo - Print assembly representations of the jump tables used
|
/// EmitJumpTableInfo - Print assembly representations of the jump tables used
|
||||||
/// by the current function to the current output stream.
|
/// 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();
|
const std::vector<MachineJumpTableEntry> &JT = MJTI->getJumpTables();
|
||||||
if (JT.empty()) return;
|
if (JT.empty()) return;
|
||||||
const TargetData *TD = TM.getTargetData();
|
const TargetData *TD = TM.getTargetData();
|
||||||
|
@ -117,7 +117,7 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
EmitConstantPool(MF.getConstantPool());
|
EmitConstantPool(MF.getConstantPool());
|
||||||
|
|
||||||
// Print out jump tables referenced by the function
|
// Print out jump tables referenced by the function
|
||||||
EmitJumpTableInfo(MF.getJumpTableInfo());
|
EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
|
||||||
|
|
||||||
// Print out labels for the function.
|
// Print out labels for the function.
|
||||||
const Function *F = MF.getFunction();
|
const Function *F = MF.getFunction();
|
||||||
|
@ -162,7 +162,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
EmitConstantPool(MF.getConstantPool());
|
EmitConstantPool(MF.getConstantPool());
|
||||||
|
|
||||||
// Print out jump tables referenced by the function
|
// Print out jump tables referenced by the function
|
||||||
EmitJumpTableInfo(MF.getJumpTableInfo());
|
EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
|
||||||
|
|
||||||
// Print out labels for the function.
|
// Print out labels for the function.
|
||||||
const Function *F = MF.getFunction();
|
const Function *F = MF.getFunction();
|
||||||
|
@ -475,7 +475,7 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Print out jump tables referenced by the function.
|
// Print out jump tables referenced by the function.
|
||||||
EmitJumpTableInfo(MF.getJumpTableInfo());
|
EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
|
||||||
|
|
||||||
// Emit post-function debug information.
|
// Emit post-function debug information.
|
||||||
DW.EndFunction();
|
DW.EndFunction();
|
||||||
|
@ -126,10 +126,11 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print out jump tables referenced by the function
|
// 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).
|
// Mac OS X requires that the jump table follow the function, so that the jump
|
||||||
EmitJumpTableInfo(MF.getJumpTableInfo());
|
// table is part of the same atom that the function is in.
|
||||||
|
EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
|
||||||
|
|
||||||
if (TAI->hasDotTypeDotSizeDirective())
|
if (TAI->hasDotTypeDotSizeDirective())
|
||||||
O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
|
O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
|
||||||
|
@ -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";
|
O << CurrentFnName << "\tendp\n";
|
||||||
|
|
||||||
// We didn't modify anything.
|
// We didn't modify anything.
|
||||||
|
Loading…
Reference in New Issue
Block a user