Skip to content

[lldb] Modify call to ASTContext::get as per new signature #3316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,8 @@ static const char *getImportFailureString(swift::serialization::Status status) {
case swift::serialization::Status::TargetTooNew:
return "The module file was built for a target newer than the current "
"target.";
case swift::serialization::Status::NotInOSSA:
return "The module file was not built with -enable-ossa-modules";
}
llvm_unreachable("covered switch");
}
Expand Down Expand Up @@ -1351,7 +1353,7 @@ static bool DeserializeAllCompilerFlags(SwiftASTContext &swift_ast,
for (; !buf.empty(); buf = buf.substr(info.bytes)) {
swift::serialization::ExtendedValidationInfo extended_validation_info;
info = swift::serialization::validateSerializedAST(
buf, &extended_validation_info);
buf, invocation.getSILOptions().EnableOSSAModules, &extended_validation_info);
bool invalid_ast = info.status != swift::serialization::Status::Valid;
bool invalid_size = (info.bytes == 0) || (info.bytes > buf.size());
bool invalid_name = info.name.empty();
Expand Down Expand Up @@ -3316,9 +3318,9 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {

LLDB_SCOPED_TIMER();
m_ast_context_ap.reset(swift::ASTContext::get(
GetLanguageOptions(), GetTypeCheckerOptions(), GetSearchPathOptions(),
GetClangImporterOptions(), GetSymbolGraphOptions(),
GetSourceManager(), GetDiagnosticEngine()));
GetLanguageOptions(), GetTypeCheckerOptions(), GetSILOptions(),
GetSearchPathOptions(), GetClangImporterOptions(),
GetSymbolGraphOptions(), GetSourceManager(), GetDiagnosticEngine()));
m_diagnostic_consumer_ap.reset(new StoringDiagnosticConsumer(*this));

if (getenv("LLDB_SWIFT_DUMP_DIAGS")) {
Expand Down