From f60e437168c8c4aff4b404b4bb6acf57b7f95cdd Mon Sep 17 00:00:00 2001 From: John McCall Date: Thu, 21 Jun 2012 17:46:38 +0000 Subject: [PATCH] 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. llvm-svn: 158926 --- clang/lib/Driver/ToolChains.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 1a0cd939ddc4..93df747c3f16 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/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()) {