Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2021-09-23 07:13:34 -07:00
2 changed files with 5 additions and 1 deletions

View File

@@ -1067,6 +1067,10 @@ swift::extractUserModuleVersionFromInterface(StringRef moduleInterfacePath) {
// Check the version number specified via -user-module-version.
StringRef current(args[I]), next(args[I + 1]);
if (current == "-user-module-version") {
// Sanitize versions that are too long
while(next.count('.') > 3) {
next = next.rsplit('.').first;
}
result.tryParse(next);
break;
}