From: Evan Cheng Date: Thu, 22 May 2008 23:55:24 +0000 (+0000) Subject: X86CodeEmitter should not set PIC style to None at initialization time. This will... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5bbaf01b84d22fc654588e1e3c2db5be4cb41531;p=oota-llvm.git X86CodeEmitter should not set PIC style to None at initialization time. This will break codegen if relocation model is changed to PIC_ later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51455 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index a60ce09ab9c..19ceef8de15 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -180,10 +180,8 @@ bool X86TargetMachine::addAssemblyEmitter(PassManagerBase &PM, bool Fast, bool X86TargetMachine::addCodeEmitter(PassManagerBase &PM, bool Fast, bool DumpAsm, MachineCodeEmitter &MCE) { // FIXME: Move this to TargetJITInfo! - if (DefRelocModel == Reloc::Default) { + if (DefRelocModel == Reloc::Default) setRelocationModel(Reloc::Static); - Subtarget.setPICStyle(PICStyle::None); - } // JIT cannot ensure globals are placed in the lower 4G of address. if (Subtarget.is64Bit())