diff options
author | Stuart Hastings <stuart@apple.com> | 2009-07-15 17:27:11 +0000 |
---|---|---|
committer | Stuart Hastings <stuart@apple.com> | 2009-07-15 17:27:11 +0000 |
commit | 1721b8dc5f33106beb57f85ac96a493820e99993 (patch) | |
tree | 2443581013659cf94139995c03b6883ff4ab43db /lib/Target/MSP430 | |
parent | 1615d6742915aa80a589b1177e4423676150ee80 (diff) | |
download | external_llvm-1721b8dc5f33106beb57f85ac96a493820e99993.zip external_llvm-1721b8dc5f33106beb57f85ac96a493820e99993.tar.gz external_llvm-1721b8dc5f33106beb57f85ac96a493820e99993.tar.bz2 |
Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to repair broken LLVM-GCC build.
Will revert 75770 in the llvm-gcc trunk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430')
-rw-r--r-- | lib/Target/MSP430/MSP430TargetMachine.cpp | 18 | ||||
-rw-r--r-- | lib/Target/MSP430/MSP430TargetMachine.h | 3 |
2 files changed, 15 insertions, 6 deletions
diff --git a/lib/Target/MSP430/MSP430TargetMachine.cpp b/lib/Target/MSP430/MSP430TargetMachine.cpp index bf259e2..924c7e8 100644 --- a/lib/Target/MSP430/MSP430TargetMachine.cpp +++ b/lib/Target/MSP430/MSP430TargetMachine.cpp @@ -32,17 +32,14 @@ int MSP430TargetMachineModule = 0; // Register the targets -extern Target TheMSP430Target; static RegisterTarget<MSP430TargetMachine> -X(TheMSP430Target, "msp430", "MSP430 [experimental]"); +X("msp430", "MSP430 [experimental]"); // Force static initialization. extern "C" void LLVMInitializeMSP430Target() { } -MSP430TargetMachine::MSP430TargetMachine(const Target &T, - const Module &M, +MSP430TargetMachine::MSP430TargetMachine(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"), @@ -69,3 +66,14 @@ 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; +} + diff --git a/lib/Target/MSP430/MSP430TargetMachine.h b/lib/Target/MSP430/MSP430TargetMachine.h index dfe827b..0a5c64e 100644 --- a/lib/Target/MSP430/MSP430TargetMachine.h +++ b/lib/Target/MSP430/MSP430TargetMachine.h @@ -41,7 +41,7 @@ protected: virtual const TargetAsmInfo *createTargetAsmInfo() const; public: - MSP430TargetMachine(const Target &T, const Module &M, const std::string &FS); + MSP430TargetMachine(const Module &M, const std::string &FS); virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; } virtual const MSP430InstrInfo *getInstrInfo() const { return &InstrInfo; } @@ -60,6 +60,7 @@ public: virtual bool addAssemblyEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, bool Verbose, formatted_raw_ostream &Out); + static unsigned getModuleMatchQuality(const Module &M); }; // MSP430TargetMachine. } // end namespace llvm |