@@ -1262,6 +1262,8 @@ static const char *getImportFailureString(swift::serialization::Status status) {
1262
1262
case swift::serialization::Status::TargetTooNew:
1263
1263
return " The module file was built for a target newer than the current "
1264
1264
" target." ;
1265
+ case swift::serialization::Status::NotInOSSA:
1266
+ return " The module file was not built with -enable-ossa-modules" ;
1265
1267
}
1266
1268
llvm_unreachable (" covered switch" );
1267
1269
}
@@ -1351,7 +1353,7 @@ static bool DeserializeAllCompilerFlags(SwiftASTContext &swift_ast,
1351
1353
for (; !buf.empty (); buf = buf.substr (info.bytes )) {
1352
1354
swift::serialization::ExtendedValidationInfo extended_validation_info;
1353
1355
info = swift::serialization::validateSerializedAST (
1354
- buf, &extended_validation_info);
1356
+ buf, invocation. getSILOptions (). EnableOSSAModules , &extended_validation_info);
1355
1357
bool invalid_ast = info.status != swift::serialization::Status::Valid;
1356
1358
bool invalid_size = (info.bytes == 0 ) || (info.bytes > buf.size ());
1357
1359
bool invalid_name = info.name .empty ();
@@ -3316,9 +3318,9 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
3316
3318
3317
3319
LLDB_SCOPED_TIMER ();
3318
3320
m_ast_context_ap.reset (swift::ASTContext::get (
3319
- GetLanguageOptions (), GetTypeCheckerOptions (), GetSearchPathOptions (),
3320
- GetClangImporterOptions (), GetSymbolGraphOptions (),
3321
- GetSourceManager (), GetDiagnosticEngine ()));
3321
+ GetLanguageOptions (), GetTypeCheckerOptions (), GetSILOptions (),
3322
+ GetSearchPathOptions (), GetClangImporterOptions (),
3323
+ GetSymbolGraphOptions (), GetSourceManager (), GetDiagnosticEngine ()));
3322
3324
m_diagnostic_consumer_ap.reset (new StoringDiagnosticConsumer (*this ));
3323
3325
3324
3326
if (getenv (" LLDB_SWIFT_DUMP_DIAGS" )) {
0 commit comments