Remove Darwin'ism
authorAnton Korobeynikov <asl@math.spbu.ru>
Sun, 20 Jan 2008 13:59:37 +0000 (13:59 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sun, 20 Jan 2008 13:59:37 +0000 (13:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46199 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ATTAsmPrinter.cpp

index 5b6450174a3fcbfb1823fc31e8e90df498784616..8198fbe860e62771d63a9c3b43f229cb08fb9ebc 100644 (file)
@@ -363,10 +363,7 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
           O << "@GOTOFF";
       } else if (Subtarget->isPICStyleRIPRel() && !NotRIPRel &&
                  TM.getRelocationModel() != Reloc::Static) {
-        if ((GV->isDeclaration() ||
-             GV->hasWeakLinkage() ||
-             GV->hasLinkOnceLinkage()) &&
-            TM.getRelocationModel() != Reloc::Static)
+        if (Subtarget->GVRequiresExtraLoad(GV, TM, false))
           O << "@GOTPCREL";
 
         if (needCloseParen) {