Skip to content

Commit 5a24d76

Browse files
committed
[lldb] Modify call to ASTContext::get as per new signature
Needed due to llvm#39516
1 parent 063fb68 commit 5a24d76

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
@@ -1262,6 +1262,8 @@ static const char *getImportFailureString(swift::serialization::Status status) {
12621262
case swift::serialization::Status::TargetTooNew:
12631263
return "The module file was built for a target newer than the current "
12641264
"target.";
1265+
case swift::serialization::Status::NotInOSSA:
1266+
return "The module file was not built with -enable-ossa-modules";
12651267
}
12661268
llvm_unreachable("covered switch");
12671269
}
@@ -1351,7 +1353,7 @@ static bool DeserializeAllCompilerFlags(SwiftASTContext &swift_ast,
13511353
for (; !buf.empty(); buf = buf.substr(info.bytes)) {
13521354
swift::serialization::ExtendedValidationInfo extended_validation_info;
13531355
info = swift::serialization::validateSerializedAST(
1354-
buf, &extended_validation_info);
1356+
buf, invocation.getSILOptions().EnableOSSAModules, &extended_validation_info);
13551357
bool invalid_ast = info.status != swift::serialization::Status::Valid;
13561358
bool invalid_size = (info.bytes == 0) || (info.bytes > buf.size());
13571359
bool invalid_name = info.name.empty();
@@ -3316,9 +3318,9 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
33163318

33173319
LLDB_SCOPED_TIMER();
33183320
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()));
33223324
m_diagnostic_consumer_ap.reset(new StoringDiagnosticConsumer(*this));
33233325

33243326
if (getenv("LLDB_SWIFT_DUMP_DIAGS")) {

0 commit comments

Comments
 (0)