]> granicus.if.org Git - clang/commitdiff
Adjust this code so that it strictly honors
authorJohn McCall <rjmccall@apple.com>
Thu, 21 Jun 2012 17:46:38 +0000 (17:46 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 21 Jun 2012 17:46:38 +0000 (17:46 +0000)
TargetSimulatroVersionFromDefines if present;  this also makes
it easier to chain things correctly.  Noted by an internal
review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158926 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp

index 1a0cd939ddc44e340984c7352b2d1efdc55594de..93df747c3f16ce259587908760402ee55afbf6e6 100644 (file)
@@ -877,10 +877,12 @@ DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args,
     StringRef where;
 
     // Complain about targetting iOS < 5.0 in any way.
-    if ((TargetSimulatorVersionFromDefines != VersionTuple() &&
-         TargetSimulatorVersionFromDefines < VersionTuple(5, 0)) ||
-        (isTargetIPhoneOS() && isIPhoneOSVersionLT(5, 0))) {
-      where = "iOS 5.0";
+    if (TargetSimulatorVersionFromDefines != VersionTuple()) {
+      if (TargetSimulatorVersionFromDefines < VersionTuple(5, 0))
+        where = "iOS 5.0";
+    } else if (isTargetIPhoneOS()) {
+      if (isIPhoneOSVersionLT(5, 0))
+        where = "iOS 5.0";
     }
 
     if (where != StringRef()) {