Skip to content

Commit 082d1eb

Browse files
meg-guptamedismailben
authored andcommitted
[lldb] Modify call to ASTContext::get as per new signature
Needed due to llvm#39516
1 parent 82234e9 commit 082d1eb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,8 @@ static const char *getImportFailureString(swift::serialization::Status status) {
12741274
case swift::serialization::Status::RevisionIncompatible:
12751275
return "The module file was built with library evolution enabled by a "
12761276
"different version of the compiler.";
1277+
case swift::serialization::Status::NotInOSSA:
1278+
return "The module file was not built with -enable-ossa-modules";
12771279
}
12781280
}
12791281

@@ -1361,7 +1363,7 @@ static bool DeserializeAllCompilerFlags(swift::CompilerInvocation &invocation,
13611363
for (; !buf.empty(); buf = buf.substr(info.bytes)) {
13621364
swift::serialization::ExtendedValidationInfo extended_validation_info;
13631365
info = swift::serialization::validateSerializedAST(
1364-
buf, &extended_validation_info);
1366+
buf, invocation.getSILOptions().EnableOSSAModules, &extended_validation_info);
13651367
bool invalid_ast = info.status != swift::serialization::Status::Valid;
13661368
bool invalid_size = (info.bytes == 0) || (info.bytes > buf.size());
13671369
bool invalid_name = info.name.empty();
@@ -3385,9 +3387,9 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
33853387

33863388
LLDB_SCOPED_TIMER();
33873389
m_ast_context_ap.reset(swift::ASTContext::get(
3388-
GetLanguageOptions(), GetTypeCheckerOptions(), GetSearchPathOptions(),
3389-
GetClangImporterOptions(), GetSymbolGraphOptions(),
3390-
GetSourceManager(), GetDiagnosticEngine()));
3390+
GetLanguageOptions(), GetTypeCheckerOptions(), GetSILOptions(),
3391+
GetSearchPathOptions(), GetClangImporterOptions(),
3392+
GetSymbolGraphOptions(), GetSourceManager(), GetDiagnosticEngine()));
33913393
m_diagnostic_consumer_ap.reset(new StoringDiagnosticConsumer(*this));
33923394

33933395
if (getenv("LLDB_SWIFT_DUMP_DIAGS")) {

0 commit comments

Comments
 (0)