aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/MSP430/MSP430TargetMachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/MSP430/MSP430TargetMachine.cpp')
-rw-r--r--lib/Target/MSP430/MSP430TargetMachine.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/Target/MSP430/MSP430TargetMachine.cpp b/lib/Target/MSP430/MSP430TargetMachine.cpp
index 924c7e82d8..bf259e2add 100644
--- a/lib/Target/MSP430/MSP430TargetMachine.cpp
+++ b/lib/Target/MSP430/MSP430TargetMachine.cpp
@@ -32,14 +32,17 @@ int MSP430TargetMachineModule = 0;
// Register the targets
+extern Target TheMSP430Target;
static RegisterTarget<MSP430TargetMachine>
-X("msp430", "MSP430 [experimental]");
+X(TheMSP430Target, "msp430", "MSP430 [experimental]");
// Force static initialization.
extern "C" void LLVMInitializeMSP430Target() { }
-MSP430TargetMachine::MSP430TargetMachine(const Module &M,
+MSP430TargetMachine::MSP430TargetMachine(const Target &T,
+ const Module &M,
const std::string &FS) :
+ LLVMTargetMachine(T),
Subtarget(*this, M, FS),
// FIXME: Check TargetData string.
DataLayout("e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"),
@@ -66,14 +69,3 @@ bool MSP430TargetMachine::addAssemblyEmitter(PassManagerBase &PM,
return false;
}
-unsigned MSP430TargetMachine::getModuleMatchQuality(const Module &M) {
- std::string TT = M.getTargetTriple();
-
- // We strongly match msp430
- if (TT.size() >= 6 && TT[0] == 'm' && TT[1] == 's' && TT[2] == 'p' &&
- TT[3] == '4' && TT[4] == '3' && TT[5] == '0')
- return 20;
-
- return 0;
-}
-