Removed searching for "darwin" keyword in target triple. We don't really support
any alternative targets at this point other than "darwin," so we now default to
Darwin targets (for now).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44572 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/Targets.cpp b/Driver/Targets.cpp
index 07e0d62..c463fb9 100644
--- a/Driver/Targets.cpp
+++ b/Driver/Targets.cpp
@@ -666,7 +666,7 @@
 // Driver code
 //===----------------------------------------------------------------------===//
 
-static bool IsX86(const std::string& TT) {
+static inline bool IsX86(const std::string& TT) {
   return (TT.size() >= 5 && TT[0] == 'i' && TT[2] == '8' && TT[3] == '6' &&
           TT[4] == '-' && TT[1] - '3' < 6);
 }
@@ -674,20 +674,18 @@
 /// CreateTarget - Create the TargetInfoImpl object for the specified target
 /// enum value.
 static TargetInfoImpl *CreateTarget(const std::string& T) {
-  if (T.find("darwin") != std::string::npos) {
-    if (T.find("ppc-") == 0)
-      return new DarwinPPCTargetInfo(T);
-    else if (T.find("ppc64-") == 0)
-      return new DarwinPPC64TargetInfo(T);
-    else if (T.find("x86_64-") == 0)
-      return new DarwinX86_64TargetInfo(T);
-    else if (IsX86(T))
-      return new DarwinI386TargetInfo(T);
-    else if (T.find("bogusW16W16-") == 0) // For testing portability.
-      return new LinuxTargetInfo(T);
-  }
-
-  return NULL;
+  if (T.find("ppc-") == 0)
+    return new DarwinPPCTargetInfo(T);
+  else if (T.find("ppc64-") == 0)
+    return new DarwinPPC64TargetInfo(T);
+  else if (T.find("x86_64-") == 0)
+    return new DarwinX86_64TargetInfo(T);
+  else if (IsX86(T))
+    return new DarwinI386TargetInfo(T);
+  else if (T.find("bogusW16W16-") == 0) // For testing portability.
+    return new LinuxTargetInfo(T);
+  else
+    return NULL;
 }
 
 /// CreateTargetInfo - Return the set of target info objects as specified by