From b92767afd442a8363a8696e54880ee31c5d48c1e Mon Sep 17 00:00:00 2001 From: Jim Laskey Date: Thu, 14 Dec 2006 22:53:42 +0000 Subject: [PATCH] Simplify the fetching of relocation mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32588 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/JIT/JITEmitter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index bd1b895067c..227c5dbb640 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/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 &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. -- 2.34.1