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 1a0cd93..93df747 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -877,10 +877,12 @@
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()) {