[AVR] Fix signuature of AVRTargetMachine constructor

llvm-svn: 270292
This commit is contained in:
Dylan McKay 2016-05-20 23:39:04 +00:00
parent 71f9564e7f
commit be8e2e0fa8
2 changed files with 7 additions and 4 deletions

View File

@ -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();

View File

@ -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: