aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-06-21 17:46:38 +0000
committerJohn McCall <rjmccall@apple.com>2012-06-21 17:46:38 +0000
commite48601573b9631600f563957476edb3b9cd41387 (patch)
tree74f58e803736f0e9a709b19c4918a661a7d12c59
parent362113ff5144165cb83dbbba38faf39f715c2fa9 (diff)
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
-rw-r--r--lib/Driver/ToolChains.cpp10
1 files changed, 6 insertions, 4 deletions
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()) {