Track the minimum deployment target and use it for 'unavailable' computations.

Swift SVN r20955
This commit is contained in:
Doug Gregor
2014-08-02 18:05:45 +00:00
parent 2688dd426f
commit f52c6789db
17 changed files with 153 additions and 46 deletions

View File

@@ -87,6 +87,17 @@ static void updateTargetConfigurationOptions(LangOptions &LangOpts,
default:
llvm_unreachable("Unsupported target architecture");
}
// Set the minimum platform version for deployment.
unsigned major, minor, revision;
if (triple.isMacOSX()) {
triple.getMacOSXVersion(major, minor, revision);
} else if (triple.isiOS()) {
triple.getiOSVersion(major, minor, revision);
} else {
llvm_unreachable("Unsupported target OS");
}
LangOpts.MinPlatformVersion = clang::VersionTuple(major, minor, revision);
}
void CompilerInvocation::setTargetTriple(StringRef Triple) {