mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Allow one to separately specify the ABI name of a module.
Introduce a new compiler flag `-module-abi-name <name>` that uses the given name as the ABI name for the module (rather than the module's name in source code). The ABI name impacts name mangling and metadata.
This commit is contained in:
@@ -148,6 +148,9 @@ static bool readOptionsBlock(llvm::BitstreamCursor &cursor,
|
||||
case options_block::IS_ALLOW_MODULE_WITH_COMPILER_ERRORS_ENABLED:
|
||||
extendedInfo.setAllowModuleWithCompilerErrorsEnabled(true);
|
||||
break;
|
||||
case options_block::MODULE_ABI_NAME:
|
||||
extendedInfo.setModuleABIName(blobData);
|
||||
break;
|
||||
default:
|
||||
// Unknown options record, possibly for use by a future version of the
|
||||
// module format.
|
||||
@@ -1177,6 +1180,7 @@ ModuleFileSharedCore::ModuleFileSharedCore(
|
||||
Bits.IsAllowModuleWithCompilerErrorsEnabled =
|
||||
extInfo.isAllowModuleWithCompilerErrorsEnabled();
|
||||
MiscVersion = info.miscVersion;
|
||||
ModuleABIName = extInfo.getModuleABIName();
|
||||
|
||||
hasValidControlBlock = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user