From: John McCall Date: Thu, 21 Jun 2012 17:46:38 +0000 (+0000) Subject: Adjust this code so that it strictly honors X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e48601573b9631600f563957476edb3b9cd41387;p=clang Adjust this code so that it strictly honors 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 --- diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 1a0cd939dd..93df747c3f 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -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()) {