diff options
Diffstat (limited to 'gnu/llvm/lib/Target/AVR/AVRTargetMachine.cpp')
| -rw-r--r-- | gnu/llvm/lib/Target/AVR/AVRTargetMachine.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gnu/llvm/lib/Target/AVR/AVRTargetMachine.cpp b/gnu/llvm/lib/Target/AVR/AVRTargetMachine.cpp index e698b6e694c..f9a738b2182 100644 --- a/gnu/llvm/lib/Target/AVR/AVRTargetMachine.cpp +++ b/gnu/llvm/lib/Target/AVR/AVRTargetMachine.cpp @@ -40,14 +40,21 @@ static Reloc::Model getEffectiveRelocModel(Optional<Reloc::Model> RM) { return RM.hasValue() ? *RM : Reloc::Static; } +static CodeModel::Model getEffectiveCodeModel(Optional<CodeModel::Model> CM) { + if (CM) + return *CM; + return CodeModel::Small; +} + AVRTargetMachine::AVRTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, - Optional<Reloc::Model> RM, CodeModel::Model CM, - CodeGenOpt::Level OL) - : LLVMTargetMachine( - T, AVRDataLayout, TT, - getCPU(CPU), FS, Options, getEffectiveRelocModel(RM), CM, OL), + Optional<Reloc::Model> RM, + Optional<CodeModel::Model> CM, + CodeGenOpt::Level OL, bool JIT) + : LLVMTargetMachine(T, AVRDataLayout, TT, getCPU(CPU), FS, Options, + getEffectiveRelocModel(RM), getEffectiveCodeModel(CM), + OL), SubTarget(TT, getCPU(CPU), FS, *this) { this->TLOF = make_unique<AVRTargetObjectFile>(); initAsmInfo(); @@ -81,7 +88,6 @@ extern "C" void LLVMInitializeAVRTarget() { auto &PR = *PassRegistry::getPassRegistry(); initializeAVRExpandPseudoPass(PR); - initializeAVRInstrumentFunctionsPass(PR); initializeAVRRelaxMemPass(PR); } |
