]> granicus.if.org Git - llvm/commitdiff
Use isPositionIndependent(). NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 27 Jun 2016 17:21:46 +0000 (17:21 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 27 Jun 2016 17:21:46 +0000 (17:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273896 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/MipsAsmPrinter.cpp

index d48cac76c03f0c65f611aad93debcdcbec42a587..3686c2fe3ec459997e436e5943bb23d066c1be41 100644 (file)
@@ -691,12 +691,11 @@ void MipsAsmPrinter::EmitStartOfAsmFile(Module &M) {
   const MipsABIInfo &ABI = MTM.getABI();
   if (IsABICalls) {
     TS.emitDirectiveAbiCalls();
-    Reloc::Model RM = TM.getRelocationModel();
     // FIXME: This condition should be a lot more complicated that it is here.
     //        Ideally it should test for properties of the ABI and not the ABI
     //        itself.
     //        For the moment, I'm only correcting enough to make MIPS-IV work.
-    if (RM == Reloc::Static && !ABI.IsN64())
+    if (!isPositionIndependent() && !ABI.IsN64())
       TS.emitDirectiveOptionPic0();
   }
 
@@ -969,7 +968,7 @@ void MipsAsmPrinter::EmitFPCallStub(
   OutStreamer->EmitLabel(Stub);
 
   // Only handle non-pic for now.
-  assert(TM.getRelocationModel() != Reloc::PIC_ &&
+  assert(!isPositionIndependent() &&
          "should not be here if we are compiling pic");
   TS.emitDirectiveSetReorder();
   //