aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/Mips/MipsTargetMachine.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-01-08 18:18:57 +0000
committerEric Christopher <echristo@gmail.com>2015-01-08 18:18:57 +0000
commit90724285a2165c6843f71fd266572be98b5af17c (patch)
tree322f968676a14503462c821e082fca31df8c3067 /llvm/lib/Target/Mips/MipsTargetMachine.cpp
parentd8abc3a95679e3db3497122e9372f4b08c76d895 (diff)
downloadllvm-90724285a2165c6843f71fd266572be98b5af17c.zip
llvm-90724285a2165c6843f71fd266572be98b5af17c.tar.gz
llvm-90724285a2165c6843f71fd266572be98b5af17c.tar.bz2
Make the TargetMachine in MipsSubtarget a reference rather
than a pointer to make unifying code a bit easier. llvm-svn: 225459
Diffstat (limited to 'llvm/lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/Mips/MipsTargetMachine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/Mips/MipsTargetMachine.cpp b/llvm/lib/Target/Mips/MipsTargetMachine.cpp
index 4a9889f..426b71d 100644
--- a/llvm/lib/Target/Mips/MipsTargetMachine.cpp
+++ b/llvm/lib/Target/Mips/MipsTargetMachine.cpp
@@ -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();
}