summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-06-27 17:21:46 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-06-27 17:21:46 +0000
commitb0f59cb5a8ad1037dd5e1c202d745a6c162f647a (patch)
treef62cb4c3277336342d5a77bebbea2fb5a1d91af7 /llvm/lib/Target/Mips/MipsAsmPrinter.cpp
parent72f76b880534c682b411c64338b59dd336fa19c8 (diff)
downloadbcm5719-llvm-b0f59cb5a8ad1037dd5e1c202d745a6c162f647a.tar.gz
bcm5719-llvm-b0f59cb5a8ad1037dd5e1c202d745a6c162f647a.zip
Use isPositionIndependent(). NFC.
llvm-svn: 273896
Diffstat (limited to 'llvm/lib/Target/Mips/MipsAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/Mips/MipsAsmPrinter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
index d48cac76c03..3686c2fe3ec 100644
--- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -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();
//
OpenPOWER on IntegriCloud