[Serialization] Write in the swiftmodule if it's built from a swiftinterface

This information will allow us to distinguish swiftmodule built from
source vs swiftinterface.
This commit is contained in:
Alexis Laferrière
2022-10-25 13:40:52 -07:00
parent 79565a4f9e
commit 2854c1b3cb
10 changed files with 46 additions and 3 deletions

View File

@@ -151,6 +151,9 @@ static bool readOptionsBlock(llvm::BitstreamCursor &cursor,
options_block::ResilienceStrategyLayout::readRecord(scratch, Strategy);
extendedInfo.setResilienceStrategy(ResilienceStrategy(Strategy));
break;
case options_block::IS_BUILT_FROM_INTERFACE:
extendedInfo.setIsBuiltFromInterface(true);
break;
case options_block::IS_ALLOW_MODULE_WITH_COMPILER_ERRORS_ENABLED:
extendedInfo.setAllowModuleWithCompilerErrorsEnabled(true);
break;
@@ -1319,6 +1322,7 @@ ModuleFileSharedCore::ModuleFileSharedCore(
Bits.IsTestable = extInfo.isTestable();
Bits.ResilienceStrategy = unsigned(extInfo.getResilienceStrategy());
Bits.IsImplicitDynamicEnabled = extInfo.isImplicitDynamicEnabled();
Bits.IsBuiltFromInterface = extInfo.isBuiltFromInterface();
Bits.IsAllowModuleWithCompilerErrorsEnabled =
extInfo.isAllowModuleWithCompilerErrorsEnabled();
Bits.IsConcurrencyChecked = extInfo.isConcurrencyChecked();