Add TargetRegistry::lookupTarget.
 - This is a simplified mechanism which just looks up a target based on the
   target triple, with a few additional flags.

 - Remove getClosestStaticTargetForModule, the moral equivalent is now:
     lookupTarget(Mod->getTargetTriple, true, false, ...);

 - This no longer does the fuzzy matching with target data (based on endianness
   and pointer width) that getClosestStaticTargetForModule was doing, but this
   was deemed unnecessary.

llvm-svn: 77111
diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp
index c2681e4..d110684 100644
--- a/llvm/lib/Target/CBackend/CBackend.cpp
+++ b/llvm/lib/Target/CBackend/CBackend.cpp
@@ -3185,7 +3185,10 @@
   if (!TAsm) {
     std::string E;
     const Target *Match =
-      TargetRegistry::getClosestStaticTargetForModule(*TheModule, E);
+      TargetRegistry::lookupTarget(TheModule->getTargetTriple(), 
+                                   /*FallbackToHost=*/true,
+                                   /*RequireJIT=*/false,
+                                   E);
     if (Match) {
       // Per platform Target Machines don't exist, so create it;
       // this must be done only once.