[llvm] r273896 - Use isPositionIndependent(). NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 10:21:46 PDT 2016
Author: rafael
Date: Mon Jun 27 12:21:46 2016
New Revision: 273896
URL: http://llvm.org/viewvc/llvm-project?rev=273896&view=rev
Log:
Use isPositionIndependent(). NFC.
Modified:
llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=273896&r1=273895&r2=273896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Mon Jun 27 12:21:46 2016
@@ -691,12 +691,11 @@ void MipsAsmPrinter::EmitStartOfAsmFile(
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();
//
More information about the llvm-commits
mailing list