diff options
| author | Dylan McKay <dylanmckay34@gmail.com> | 2016-05-20 23:39:04 +0000 |
|---|---|---|
| committer | Dylan McKay <dylanmckay34@gmail.com> | 2016-05-20 23:39:04 +0000 |
| commit | be8e2e0fa8076d6d6c9e1c4f84a1edd2949192dd (patch) | |
| tree | 1213be3c260671ebc0e0da223c3af51a878f825a /llvm/lib/Target/AVR | |
| parent | 71f9564e7fd2ae6a0b7b8a7258591b218f51b24b (diff) | |
| download | bcm5719-llvm-be8e2e0fa8076d6d6c9e1c4f84a1edd2949192dd.tar.gz bcm5719-llvm-be8e2e0fa8076d6d6c9e1c4f84a1edd2949192dd.zip | |
[AVR] Fix signuature of AVRTargetMachine constructor
llvm-svn: 270292
Diffstat (limited to 'llvm/lib/Target/AVR')
| -rw-r--r-- | llvm/lib/Target/AVR/AVRTargetMachine.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Target/AVR/AVRTargetMachine.h | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Target/AVR/AVRTargetMachine.cpp b/llvm/lib/Target/AVR/AVRTargetMachine.cpp index 125cfb468fb..508723e91c6 100644 --- a/llvm/lib/Target/AVR/AVRTargetMachine.cpp +++ b/llvm/lib/Target/AVR/AVRTargetMachine.cpp @@ -34,14 +34,18 @@ static StringRef getCPU(StringRef CPU) { return CPU; } +static Reloc::Model getEffectiveRelocModel(Optional<Reloc::Model> RM) { + return RM.hasValue() ? *RM : Reloc::Static; +} + AVRTargetMachine::AVRTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, - Reloc::Model RM, CodeModel::Model CM, + Optional<Reloc::Model> RM, CodeModel::Model CM, CodeGenOpt::Level OL) : LLVMTargetMachine( T, "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8-i64:8:8-f32:8:8-f64:8:8-n8", TT, - getCPU(CPU), FS, Options, RM, CM, OL), + getCPU(CPU), FS, Options, getEffectiveRelocModel(RM), CM, OL), SubTarget(TT, getCPU(CPU), FS, *this) { this->TLOF = make_unique<AVRTargetObjectFile>(); initAsmInfo(); diff --git a/llvm/lib/Target/AVR/AVRTargetMachine.h b/llvm/lib/Target/AVR/AVRTargetMachine.h index 6993dd998bf..10345193d14 100644 --- a/llvm/lib/Target/AVR/AVRTargetMachine.h +++ b/llvm/lib/Target/AVR/AVRTargetMachine.h @@ -29,7 +29,7 @@ namespace llvm { class AVRTargetMachine : public LLVMTargetMachine { public: AVRTargetMachine(const Target &T, const Triple &TT, StringRef CPU, - StringRef FS, const TargetOptions &Options, Reloc::Model RM, + StringRef FS, const TargetOptions &Options, Optional<Reloc::Model> RM, CodeModel::Model CM, CodeGenOpt::Level OL); const AVRSubtarget *getSubtargetImpl() const; @@ -39,7 +39,6 @@ public: return this->TLOF.get(); } - // Pass Pipeline Configuration. TargetPassConfig *createPassConfig(PassManagerBase &PM) override; private: |

