summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetLoweringObjectFile.cpp
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/TargetLoweringObjectFile.cpp
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/TargetLoweringObjectFile.cpp')
-rw-r--r--llvm/lib/Target/TargetLoweringObjectFile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp
index 4169237aa30..b2b69025851 100644
--- a/llvm/lib/Target/TargetLoweringObjectFile.cpp
+++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp
@@ -43,7 +43,8 @@ using namespace llvm;
void TargetLoweringObjectFile::Initialize(MCContext &ctx,
const TargetMachine &TM) {
Ctx = &ctx;
- InitMCObjectFileInfo(TM.getTargetTriple(), TM.getRelocationModel(),
+ InitMCObjectFileInfo(TM.getTargetTriple(),
+ TM.getRelocationModel() == Reloc::PIC_,
TM.getCodeModel(), *Ctx);
}
OpenPOWER on IntegriCloud