diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-03-31 02:38:36 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-03-31 02:38:36 +0000 |
commit | b2874df81d60246f594d178adc89a2905eaa7361 (patch) | |
tree | 3b2f9c7a9b092891b0bc8932bed3255c25bf7587 /lib/Target/Mips/MCTargetDesc | |
parent | dd9a50196cd75dbcb2bd604754cd62f8c1f30357 (diff) | |
download | external_llvm-b2874df81d60246f594d178adc89a2905eaa7361.zip external_llvm-b2874df81d60246f594d178adc89a2905eaa7361.tar.gz external_llvm-b2874df81d60246f594d178adc89a2905eaa7361.tar.bz2 |
Select static relocation model if it is jitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MCTargetDesc')
-rw-r--r-- | lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp b/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp index 7652675..09964e5 100644 --- a/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp +++ b/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp @@ -67,7 +67,9 @@ static MCCodeGenInfo *createMipsMCCodeGenInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) { MCCodeGenInfo *X = new MCCodeGenInfo(); - if (RM == Reloc::Default) + if (CM == CodeModel::JITDefault) + RM = Reloc::Static; + else if (RM == Reloc::Default) RM = Reloc::PIC_; X->InitMCCodeGenInfo(RM, CM, OL); return X; |