summaryrefslogtreecommitdiff
path: root/include
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
commit2dc637165b694522656e753081dafd9760ec850f (patch)
treee3b5898819693b456cfe0d1157010827628410e3 /include
parent9c1a0c965c26534e619ddae4c127778e99da46a2 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269909 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCObjectFileInfo.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/MC/MCObjectFileInfo.h b/include/llvm/MC/MCObjectFileInfo.h
index 2e3d4f87060..0b1ec32bd1a 100644
--- a/include/llvm/MC/MCObjectFileInfo.h
+++ b/include/llvm/MC/MCObjectFileInfo.h
@@ -194,8 +194,8 @@ protected:
MCSection *SXDataSection;
public:
- void InitMCObjectFileInfo(const Triple &TT, Reloc::Model RM,
- CodeModel::Model CM, MCContext &ctx);
+ void InitMCObjectFileInfo(const Triple &TT, bool PIC, CodeModel::Model CM,
+ MCContext &ctx);
bool getSupportsWeakOmittedEHFrame() const {
return SupportsWeakOmittedEHFrame;
@@ -347,11 +347,11 @@ public:
enum Environment { IsMachO, IsELF, IsCOFF };
Environment getObjectFileType() const { return Env; }
- Reloc::Model getRelocM() const { return RelocM; }
+ bool isPositionIndependent() const { return PositionIndependent; }
private:
Environment Env;
- Reloc::Model RelocM;
+ bool PositionIndependent;
CodeModel::Model CMModel;
MCContext *Ctx;
Triple TT;