Skip to content

Commit 8a11fcc

Browse files
committed
[lldb] Modify call to ASTContext::get as per new signature
Needed due to llvm#39516 (cherry picked from commit 082d1eb)
1 parent 9f1d8be commit 8a11fcc

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
@@ -1268,6 +1268,8 @@ static const char *getImportFailureString(swift::serialization::Status status) {
12681268
case swift::serialization::Status::TargetTooNew:
12691269
return "The module file was built for a target newer than the current "
12701270
"target.";
1271+
case swift::serialization::Status::NotInOSSA:
1272+
return "The module file was not built with -enable-ossa-modules";
12711273
}
12721274
}
12731275

@@ -1355,7 +1357,7 @@ static bool DeserializeAllCompilerFlags(swift::CompilerInvocation &invocation,
13551357
for (; !buf.empty(); buf = buf.substr(info.bytes)) {
13561358
swift::serialization::ExtendedValidationInfo extended_validation_info;
13571359
info = swift::serialization::validateSerializedAST(
1358-
buf, &extended_validation_info);
1360+
buf, invocation.getSILOptions().EnableOSSAModules, &extended_validation_info);
13591361
bool invalid_ast = info.status != swift::serialization::Status::Valid;
13601362
bool invalid_size = (info.bytes == 0) || (info.bytes > buf.size());
13611363
bool invalid_name = info.name.empty();
@@ -3347,9 +3349,9 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
33473349

33483350
LLDB_SCOPED_TIMER();
33493351
m_ast_context_ap.reset(swift::ASTContext::get(
3350-
GetLanguageOptions(), GetTypeCheckerOptions(), GetSearchPathOptions(),
3351-
GetClangImporterOptions(), GetSymbolGraphOptions(),
3352-
GetSourceManager(), GetDiagnosticEngine()));
3352+
GetLanguageOptions(), GetTypeCheckerOptions(), GetSILOptions(),
3353+
GetSearchPathOptions(), GetClangImporterOptions(),
3354+
GetSymbolGraphOptions(), GetSourceManager(), GetDiagnosticEngine()));
33533355
m_diagnostic_consumer_ap.reset(new StoringDiagnosticConsumer(*this));
33543356

33553357
if (getenv("LLDB_SWIFT_DUMP_DIAGS")) {

0 commit comments

Comments
 (0)