@@ -151,6 +151,9 @@ static bool readOptionsBlock(llvm::BitstreamCursor &cursor,
151151 options_block::ResilienceStrategyLayout::readRecord (scratch, Strategy);
152152 extendedInfo.setResilienceStrategy (ResilienceStrategy (Strategy));
153153 break ;
154+ case options_block::IS_BUILT_FROM_INTERFACE:
155+ extendedInfo.setIsBuiltFromInterface (true );
156+ break ;
154157 case options_block::IS_ALLOW_MODULE_WITH_COMPILER_ERRORS_ENABLED:
155158 extendedInfo.setAllowModuleWithCompilerErrorsEnabled (true );
156159 break ;
@@ -581,12 +584,17 @@ void ModuleFileSharedCore::fatal(llvm::Error error) const {
581584}
582585
583586void ModuleFileSharedCore::outputDiagnosticInfo (llvm::raw_ostream &os) const {
584- os << " module '" << Name << " ' with full misc version '" << MiscVersion
585- << " '" ;
587+ bool resilient = ResilienceStrategy (Bits.ResilienceStrategy ) ==
588+ ResilienceStrategy::Resilient;
589+ os << " module '" << Name
590+ << " ', builder version '" << MiscVersion
591+ << " ', built from "
592+ << (Bits.IsBuiltFromInterface ? " swiftinterface" : " source" )
593+ << " , " << (resilient? " resilient" : " non-resilient" );
586594 if (Bits.IsAllowModuleWithCompilerErrorsEnabled )
587- os << " ( built with -experimental-allow-module-with-compiler-errors) " ;
595+ os << " , built with -experimental-allow-module-with-compiler-errors" ;
588596 if (ModuleInputBuffer)
589- os << " at '" << ModuleInputBuffer->getBufferIdentifier () << " '" ;
597+ os << " , loaded from '" << ModuleInputBuffer->getBufferIdentifier () << " '" ;
590598}
591599
592600ModuleFileSharedCore::~ModuleFileSharedCore () { }
@@ -1319,6 +1327,7 @@ ModuleFileSharedCore::ModuleFileSharedCore(
13191327 Bits.IsTestable = extInfo.isTestable ();
13201328 Bits.ResilienceStrategy = unsigned (extInfo.getResilienceStrategy ());
13211329 Bits.IsImplicitDynamicEnabled = extInfo.isImplicitDynamicEnabled ();
1330+ Bits.IsBuiltFromInterface = extInfo.isBuiltFromInterface ();
13221331 Bits.IsAllowModuleWithCompilerErrorsEnabled =
13231332 extInfo.isAllowModuleWithCompilerErrorsEnabled ();
13241333 Bits.IsConcurrencyChecked = extInfo.isConcurrencyChecked ();
0 commit comments