diff options
| author | Jim Laskey <jlaskey@mac.com> | 2006-12-14 22:53:42 +0000 |
|---|---|---|
| committer | Jim Laskey <jlaskey@mac.com> | 2006-12-14 22:53:42 +0000 |
| commit | 3958955f4784b76903a626061df8ec3533dcbe7e (patch) | |
| tree | 3d8a214ac07e6f602e3f90c360122ffcb801a386 /llvm/lib/ExecutionEngine/JIT | |
| parent | 735fcf74d81abe143891cfde0cd5a23c4b018cd7 (diff) | |
| download | bcm5719-llvm-3958955f4784b76903a626061df8ec3533dcbe7e.tar.gz bcm5719-llvm-3958955f4784b76903a626061df8ec3533dcbe7e.zip | |
Simplify the fetching of relocation mode.
llvm-svn: 32588
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index bd1b895067c..227c5dbb640 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -701,7 +701,7 @@ public: void emitConstantPool(MachineConstantPool *MCP); void initJumpTableInfo(MachineJumpTableInfo *MJTI); - void emitJumpTableInfo(MachineJumpTableInfo *MJTI, Reloc::Model RM); + void emitJumpTableInfo(MachineJumpTableInfo *MJTI); virtual void startFunctionStub(unsigned StubSize, unsigned Alignment = 1); virtual void* finishFunctionStub(const Function *F); @@ -792,7 +792,7 @@ bool JITEmitter::finishFunction(MachineFunction &F) { abort(); } - emitJumpTableInfo(F.getJumpTableInfo(), F.getTarget().getRelocationModel()); + emitJumpTableInfo(F.getJumpTableInfo()); // FnStart is the start of the text, not the start of the constant pool and // other per-function data. @@ -915,11 +915,11 @@ void JITEmitter::initJumpTableInfo(MachineJumpTableInfo *MJTI) { JumpTableBase = allocateSpace(NumEntries * EntrySize, MJTI->getAlignment()); } -void JITEmitter::emitJumpTableInfo(MachineJumpTableInfo *MJTI, Reloc::Model RM){ +void JITEmitter::emitJumpTableInfo(MachineJumpTableInfo *MJTI) { const std::vector<MachineJumpTableEntry> &JT = MJTI->getJumpTables(); if (JT.empty() || JumpTableBase == 0) return; - if (RM == Reloc::PIC_) { + if (TargetMachine::getRelocationModel() == Reloc::PIC_) { assert(MJTI->getEntrySize() == 4 && "Cross JIT'ing?"); // For each jump table, place the offset from the beginning of the table // to the target address. |

