aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r--lib/Target/Mips/MipsSubtarget.cpp4
-rw-r--r--lib/Target/Mips/MipsSubtarget.h5
-rw-r--r--lib/Target/Mips/MipsTargetMachine.cpp2
3 files changed, 4 insertions, 7 deletions
diff --git a/lib/Target/Mips/MipsSubtarget.cpp b/lib/Target/Mips/MipsSubtarget.cpp
index 87c2208e9d..c56bc9d290 100644
--- a/lib/Target/Mips/MipsSubtarget.cpp
+++ b/lib/Target/Mips/MipsSubtarget.cpp
@@ -14,7 +14,6 @@
#include "MipsSubtarget.h"
#include "Mips.h"
#include "MipsGenSubtarget.inc"
-#include "llvm/Module.h"
#include "llvm/Support/CommandLine.h"
using namespace llvm;
@@ -25,7 +24,7 @@ static cl::opt<bool>
AbsoluteCall("enable-mips-absolute-call", cl::Hidden,
cl::desc("Enable absolute call within abicall"));
-MipsSubtarget::MipsSubtarget(const TargetMachine &TM, const Module &M,
+MipsSubtarget::MipsSubtarget(const TargetMachine &TM, const std::string &TT,
const std::string &FS, bool little) :
MipsArchVersion(Mips1), MipsABI(O32), IsLittle(little), IsSingleFloat(false),
IsFP64bit(false), IsGP64bit(false), HasVFPU(false), HasABICall(true),
@@ -37,7 +36,6 @@ MipsSubtarget::MipsSubtarget(const TargetMachine &TM, const Module &M,
// Parse features string.
ParseSubtargetFeatures(FS, CPU);
- const std::string& TT = M.getTargetTriple();
// Is the target system Linux ?
if (TT.find("linux") == std::string::npos)
diff --git a/lib/Target/Mips/MipsSubtarget.h b/lib/Target/Mips/MipsSubtarget.h
index 2244e497dd..2485fef887 100644
--- a/lib/Target/Mips/MipsSubtarget.h
+++ b/lib/Target/Mips/MipsSubtarget.h
@@ -20,7 +20,6 @@
#include <string>
namespace llvm {
-class Module;
class MipsSubtarget : public TargetSubtarget {
@@ -99,8 +98,8 @@ public:
unsigned getTargetABI() const { return MipsABI; }
/// This constructor initializes the data members to match that
- /// of the specified module.
- MipsSubtarget(const TargetMachine &TM, const Module &M,
+ /// of the specified triple.
+ MipsSubtarget(const TargetMachine &TM, const std::string &TT,
const std::string &FS, bool little);
/// ParseSubtargetFeatures - Parses features string setting specified
diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp
index b5e2da74ba..db18b097c4 100644
--- a/lib/Target/Mips/MipsTargetMachine.cpp
+++ b/lib/Target/Mips/MipsTargetMachine.cpp
@@ -42,7 +42,7 @@ MipsTargetMachine::
MipsTargetMachine(const Target &T, const Module &M, const std::string &FS,
bool isLittle=false):
LLVMTargetMachine(T),
- Subtarget(*this, M, FS, isLittle),
+ Subtarget(*this, M.getTargetTriple(), FS, isLittle),
DataLayout(isLittle ? std::string("e-p:32:32:32-i8:8:32-i16:16:32") :
std::string("E-p:32:32:32-i8:8:32-i16:16:32")),
InstrInfo(*this),