]> granicus.if.org Git - clang/commitdiff
Drop code to validate OS part of target triple on darwin, too fragile.
authorDaniel Dunbar <daniel@zuster.org>
Thu, 2 Oct 2008 00:26:24 +0000 (00:26 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 2 Oct 2008 00:26:24 +0000 (00:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56941 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/clang.cpp

index 8cfdd941b8f44cffd7884664af5bdb5294e4dc73..3ca5493d2cbd84df823c2919463f0845fb4569f3 100644 (file)
@@ -628,17 +628,6 @@ static void HandleMacOSVersionMin(std::string &Triple) {
   }
   unsigned DarwinNumIdx = DarwinDashIdx + strlen("-darwin");
   
-  // Validate that there is a number after the "-darwin" and nothing else.
-  bool IsValidDarwinNumber = Triple.size() != DarwinNumIdx;
-  for (unsigned i = DarwinNumIdx; i != Triple.size(); ++i)
-    if ((Triple[i] < '0' || Triple[i] > '9') && Triple[i] != '.')
-      IsValidDarwinNumber = false;
-  if (!IsValidDarwinNumber) {
-    fprintf(stderr, "invalid darwin target triple '%s' expected number\n", 
-            Triple.c_str());
-    exit(1);
-  }
-  
   // Remove the number.
   Triple.resize(DarwinNumIdx);