.o file writing shouldn't mess around with pic/relo models like the JIT does.
authorChris Lattner <sabre@nondot.org>
Thu, 9 Jul 2009 03:40:30 +0000 (03:40 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 9 Jul 2009 03:40:30 +0000 (03:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75096 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86TargetMachine.cpp

index cdfc7ac2f553e2e6bbb5e74383f6b0b681fcb493..9448f30878e2e6719d7ef13f2fecd4f39c2f262c 100644 (file)
@@ -305,24 +305,6 @@ bool X86TargetMachine::addCodeEmitter(PassManagerBase &PM,
                                       CodeGenOpt::Level OptLevel,
                                       bool DumpAsm,
                                       ObjectCodeEmitter &OCE) {
-  // FIXME: Move this to TargetJITInfo!
-  // On Darwin, do not override 64-bit setting made in X86TargetMachine().
-  if (DefRelocModel == Reloc::Default && 
-      (!Subtarget.isTargetDarwin() || !Subtarget.is64Bit())) {
-    setRelocationModel(Reloc::Static);
-    Subtarget.setPICStyle(PICStyles::None);
-  }
-  
-  // 64-bit JIT places everything in the same buffer except external functions.
-  // On Darwin, use small code model but hack the call instruction for 
-  // externals.  Elsewhere, do not assume globals are in the lower 4G.
-  if (Subtarget.is64Bit()) {
-    if (Subtarget.isTargetDarwin())
-      setCodeModel(CodeModel::Small);
-    else
-      setCodeModel(CodeModel::Large);
-  }
-
   PM.add(createX86ObjectCodeEmitterPass(*this, OCE));
   if (DumpAsm) {
     assert(AsmPrinterCtor && "AsmPrinter was not linked in");