mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
"-swift-version 3" means Swift 3.1, not 3.0. (#7883)
Put in a general mechanism for mapping user-specified "compatibility versions" to proper "effective versions" (what #if and @available checking should respect). This may still be different from the intrinsic "language version"; right now master is considered a "3.1" compiler with a "Swift 4 mode", and we plan to ship a "4.0" compiler with a "Swift 3 mode" that will have a version number of something like "3.2". rdar://problem/29884401 / SR-3791
This commit is contained in:
@@ -2957,7 +2957,8 @@ int main(int argc, char *argv[]) {
|
||||
if (auto swiftVersion =
|
||||
version::Version::parseVersionString(options::SwiftVersion,
|
||||
SourceLoc(), nullptr)) {
|
||||
InitInvok.getLangOptions().EffectiveLanguageVersion = *swiftVersion;
|
||||
if (auto actual = swiftVersion.getValue().getEffectiveLanguageVersion())
|
||||
InitInvok.getLangOptions().EffectiveLanguageVersion = actual.getValue();
|
||||
}
|
||||
}
|
||||
InitInvok.getClangImporterOptions().ModuleCachePath =
|
||||
|
||||
Reference in New Issue
Block a user