X86CodeEmitter should not set PIC style to None at initialization time. This will break codegen if relocation model is changed to PIC_ later.

llvm-svn: 51455
This commit is contained in:
Evan Cheng 2008-05-22 23:55:24 +00:00
parent f25b89f697
commit 2dc53b5d58

View File

@ -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())