diff options
| author | Petar Jovanovic <petar.jovanovic@imgtec.com> | 2016-04-11 15:24:23 +0000 |
|---|---|---|
| committer | Petar Jovanovic <petar.jovanovic@imgtec.com> | 2016-04-11 15:24:23 +0000 |
| commit | e578e970cb979d000e6b1d734b406aa06d9313d4 (patch) | |
| tree | e32e2e67dd5a1b37092798050e0cfad321f5eb44 /llvm/lib/Target/Mips | |
| parent | 121571b7ce32513145d0f6d3cd21e45c2f5251b6 (diff) | |
| download | bcm5719-llvm-e578e970cb979d000e6b1d734b406aa06d9313d4.tar.gz bcm5719-llvm-e578e970cb979d000e6b1d734b406aa06d9313d4.zip | |
[mips] Make Static a default relocation model for MIPS codegen
This change follows up defaults for GCC and Clang, so LLVM does not differ
from them. While number of the test files are touched with this change, they
all keep the old (expected) behaviour with the explicit option:
"-relocation-model=pic"
The tests that have not been touched are insensitive to relocation model.
Differential Revision: http://reviews.llvm.org/D17995
llvm-svn: 265949
Diffstat (limited to 'llvm/lib/Target/Mips')
| -rw-r--r-- | llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp index f1b81814b7c..d21ab1b9dff 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp @@ -87,10 +87,8 @@ static MCCodeGenInfo *createMipsMCCodeGenInfo(const Triple &TT, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) { MCCodeGenInfo *X = new MCCodeGenInfo(); - if (CM == CodeModel::JITDefault) + if (RM == Reloc::Default || CM == CodeModel::JITDefault) RM = Reloc::Static; - else if (RM == Reloc::Default) - RM = Reloc::PIC_; X->initMCCodeGenInfo(RM, CM, OL); return X; } |

