summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/AsmParser
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-05-18 11:58:50 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-05-18 11:58:50 +0000
commit699281cce7adec546a52d986928513f91272e723 (patch)
tree73a400a4fc089490aa3a8febf0f43a51ee77f81c /llvm/lib/Target/Mips/AsmParser
parenta854c0a0c3b0c295f7dcf3439e9655ad6f363f5a (diff)
downloadbcm5719-llvm-699281cce7adec546a52d986928513f91272e723.tar.gz
bcm5719-llvm-699281cce7adec546a52d986928513f91272e723.zip
Don't pass a Reloc::Model to MC.
MC only needs to know if the output is PIC or not. It never has to decide about creating GOTs and PLTs for example. The only thing that MC itself uses this information for is expanding "macros" in sparc and mips. The rest I am pretty sure could be moved to CodeGen. This is a cleanup and isolates the code from future changes to Reloc::Model. llvm-svn: 269909
Diffstat (limited to 'llvm/lib/Target/Mips/AsmParser')
-rw-r--r--llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index 2c51a592eee..00e0b3b7e00 100644
--- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -433,8 +433,7 @@ public:
CurrentFn = nullptr;
- IsPicEnabled =
- (getContext().getObjectFileInfo()->getRelocM() == Reloc::PIC_);
+ IsPicEnabled = getContext().getObjectFileInfo()->isPositionIndependent();
IsCpRestoreSet = false;
CpRestoreOffset = -1;
OpenPOWER on IntegriCloud