mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Frontend/Serialization] Narrow -swift-compiler-version to -interface-compiler-version
It might be unexpected to future users that `-swift-compiler-version` would produce a version aligned to .swiftinterface instead of one used to build the .swiftmodule file. To avoid this possible confusion, let's scope down the version to `-interface-compiler-version` flag and `SWIFT_INTERFACE_COMPILER_VERSION` option in the module.
This commit is contained in:
@@ -214,8 +214,8 @@ static bool readOptionsBlock(llvm::BitstreamCursor &cursor,
|
||||
case options_block::PUBLIC_MODULE_NAME:
|
||||
extendedInfo.setPublicModuleName(blobData);
|
||||
break;
|
||||
case options_block::SWIFT_COMPILER_VERSION:
|
||||
extendedInfo.setSwiftCompilerVersion(blobData);
|
||||
case options_block::SWIFT_INTERFACE_COMPILER_VERSION:
|
||||
extendedInfo.setSwiftInterfaceCompilerVersion(blobData);
|
||||
break;
|
||||
default:
|
||||
// Unknown options record, possibly for use by a future version of the
|
||||
@@ -1499,7 +1499,8 @@ ModuleFileSharedCore::ModuleFileSharedCore(
|
||||
ModulePackageName = extInfo.getModulePackageName();
|
||||
ModuleExportAsName = extInfo.getExportAsName();
|
||||
PublicModuleName = extInfo.getPublicModuleName();
|
||||
SwiftCompilerVersion = extInfo.getSwiftCompilerVersion();
|
||||
SwiftInterfaceCompilerVersion =
|
||||
extInfo.getSwiftInterfaceCompilerVersion();
|
||||
|
||||
hasValidControlBlock = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user