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
This commit is contained in:
John McCall 2012-06-21 17:46:38 +00:00
parent b2fd5f66b4
commit f60e437168
1 changed files with 6 additions and 4 deletions

View 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()) {