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 db622628e8
commit 97b020e61e
1 changed files with 1 additions and 3 deletions

View File

@ -180,10 +180,8 @@ bool X86TargetMachine::addAssemblyEmitter(PassManagerBase &PM, bool Fast,
bool X86TargetMachine::addCodeEmitter(PassManagerBase &PM, bool Fast, bool X86TargetMachine::addCodeEmitter(PassManagerBase &PM, bool Fast,
bool DumpAsm, MachineCodeEmitter &MCE) { bool DumpAsm, MachineCodeEmitter &MCE) {
// FIXME: Move this to TargetJITInfo! // FIXME: Move this to TargetJITInfo!
if (DefRelocModel == Reloc::Default) { if (DefRelocModel == Reloc::Default)
setRelocationModel(Reloc::Static); setRelocationModel(Reloc::Static);
Subtarget.setPICStyle(PICStyle::None);
}
// JIT cannot ensure globals are placed in the lower 4G of address. // JIT cannot ensure globals are placed in the lower 4G of address.
if (Subtarget.is64Bit()) if (Subtarget.is64Bit())