forked from OSchip/llvm-project
ARM JIT should observe -relocation-model command line option.
llvm-svn: 58433
This commit is contained in:
parent
d26da8cf82
commit
66cff408ff
|
@ -85,7 +85,9 @@ ARMTargetMachine::ARMTargetMachine(const Module &M, const std::string &FS,
|
|||
InstrInfo(Subtarget),
|
||||
FrameInfo(Subtarget),
|
||||
JITInfo(*this),
|
||||
TLInfo(*this) {}
|
||||
TLInfo(*this) {
|
||||
DefRelocModel = getRelocationModel();
|
||||
}
|
||||
|
||||
unsigned ARMTargetMachine::getJITMatchQuality() {
|
||||
#if defined(__arm__)
|
||||
|
@ -157,7 +159,8 @@ bool ARMTargetMachine::addAssemblyEmitter(PassManagerBase &PM, bool Fast,
|
|||
bool ARMTargetMachine::addCodeEmitter(PassManagerBase &PM, bool Fast,
|
||||
bool DumpAsm, MachineCodeEmitter &MCE) {
|
||||
// FIXME: Move this to TargetJITInfo!
|
||||
setRelocationModel(Reloc::Static);
|
||||
if (DefRelocModel == Reloc::Default)
|
||||
setRelocationModel(Reloc::Static);
|
||||
|
||||
// Machine code emitter pass for ARM.
|
||||
PM.add(createARMCodeEmitterPass(*this, MCE));
|
||||
|
|
|
@ -34,6 +34,7 @@ class ARMTargetMachine : public LLVMTargetMachine {
|
|||
ARMFrameInfo FrameInfo;
|
||||
ARMJITInfo JITInfo;
|
||||
ARMTargetLowering TLInfo;
|
||||
Reloc::Model DefRelocModel; // Reloc model before it's overridden.
|
||||
|
||||
protected:
|
||||
// To avoid having target depend on the asmprinter stuff libraries, asmprinter
|
||||
|
|
Loading…
Reference in New Issue