Move most targets TargetMachine constructor to only taking a target triple.
 - The C, C++, MSIL, and Mips backends still need the module.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77927 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Blackfin/BlackfinTargetMachine.cpp b/lib/Target/Blackfin/BlackfinTargetMachine.cpp
index b69adf6..943ce17 100644
--- a/lib/Target/Blackfin/BlackfinTargetMachine.cpp
+++ b/lib/Target/Blackfin/BlackfinTargetMachine.cpp
@@ -13,7 +13,6 @@
 #include "BlackfinTargetMachine.h"
 #include "Blackfin.h"
 #include "BlackfinTargetAsmInfo.h"
-#include "llvm/Module.h"
 #include "llvm/PassManager.h"
 #include "llvm/Target/TargetRegistry.h"
 
@@ -28,25 +27,16 @@
 }
 
 BlackfinTargetMachine::BlackfinTargetMachine(const Target &T,
-                                             const Module &M,
+                                             const std::string &TT,
                                              const std::string &FS)
   : LLVMTargetMachine(T),
     DataLayout("e-p:32:32-i64:32-f64:32"),
-    Subtarget(M.getTargetTriple(), FS),
+    Subtarget(TT, FS),
     TLInfo(*this),
     InstrInfo(Subtarget),
     FrameInfo(TargetFrameInfo::StackGrowsDown, 4, 0) {
 }
 
-unsigned BlackfinTargetMachine::getModuleMatchQuality(const Module &M) {
-  std::string TT = M.getTargetTriple();
-  if (TT.size() >= 5 && std::string(TT.begin(), TT.begin()+5) == "bfin-")
-    return 20;
-
-  // Otherwise we don't match.
-  return 0;
-}
-
 bool BlackfinTargetMachine::addInstSelector(PassManagerBase &PM,
                                             CodeGenOpt::Level OptLevel) {
   PM.add(createBlackfinISelDag(*this, OptLevel));