runOnMachineFunction should set IsPIC because relocation model may have been changed.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 20 May 2008 01:56:59 +0000 (01:56 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 20 May 2008 01:56:59 +0000 (01:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51291 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86CodeEmitter.cpp

index 7aa4506ad1d1d708ae4dfc58e06ff2d06ef36a94..82604a8b59f300248f1ac9e01770e09f656b51ba 100644 (file)
@@ -115,6 +115,7 @@ bool Emitter::runOnMachineFunction(MachineFunction &MF) {
   II = TM.getInstrInfo();
   TD = TM.getTargetData();
   Is64BitMode = TM.getSubtarget<X86Subtarget>().is64Bit();
+  IsPIC = TM.getRelocationModel() == Reloc::PIC_;
   
   do {
     DOUT << "JITTing function '" << MF.getFunction()->getName() << "'\n";