mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-15 22:25:31 +00:00
Make the TargetMachine in MipsSubtarget a reference rather
than a pointer to make unifying code a bit easier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225459 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -60,11 +60,11 @@ MipsTargetMachine::MipsTargetMachine(const Target &T, StringRef TT,
|
||||
isLittle(isLittle),
|
||||
TLOF(make_unique<MipsTargetObjectFile>()),
|
||||
Subtarget(nullptr),
|
||||
DefaultSubtarget(TT, CPU, FS, isLittle, this),
|
||||
DefaultSubtarget(TT, CPU, FS, isLittle, *this),
|
||||
NoMips16Subtarget(TT, CPU, FS.empty() ? "-mips16" : FS.str() + ",-mips16",
|
||||
isLittle, this),
|
||||
isLittle, *this),
|
||||
Mips16Subtarget(TT, CPU, FS.empty() ? "+mips16" : FS.str() + ",+mips16",
|
||||
isLittle, this) {
|
||||
isLittle, *this) {
|
||||
Subtarget = &DefaultSubtarget;
|
||||
initAsmInfo();
|
||||
}
|
||||
@@ -133,7 +133,7 @@ MipsTargetMachine::getSubtargetImpl(const Function &F) const {
|
||||
// creation will depend on the TM and the code generation flags on the
|
||||
// function that reside in TargetOptions.
|
||||
resetTargetOptions(F);
|
||||
I = llvm::make_unique<MipsSubtarget>(TargetTriple, CPU, FS, isLittle, this);
|
||||
I = llvm::make_unique<MipsSubtarget>(TargetTriple, CPU, FS, isLittle, *this);
|
||||
}
|
||||
return I.get();
|
||||
}
|
||||
|
Reference in New Issue
Block a user