Minor fix to enable x86-64 pic jit (still fails for other reasons).
authorEvan Cheng <evan.cheng@apple.com>
Tue, 8 Jan 2008 02:07:10 +0000 (02:07 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 8 Jan 2008 02:07:10 +0000 (02:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45734 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86TargetMachine.cpp

index 0c7ecf00097d3bcfd18745c260bfae238443e357..3c527c50b620981694c58218c0489c03272e4046 100644 (file)
@@ -171,9 +171,10 @@ bool X86TargetMachine::addAssemblyEmitter(FunctionPassManager &PM, bool Fast,
 bool X86TargetMachine::addCodeEmitter(FunctionPassManager &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);
+    Subtarget.setPICStyle(PICStyle::None);
+  }
   
   // JIT cannot ensure globals are placed in the lower 4G of address.
   if (Subtarget.is64Bit())