Skip to content

Commit e7bd8f7

Browse files
authored
Merge pull request #3363 from apple/Fix-Swift-Rebranch
[lldb] Modify call to ASTContext::get as per new signature
2 parents 8cdf7fb + 082d1eb commit e7bd8f7

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
@@ -1280,6 +1280,8 @@ static const char *getImportFailureString(swift::serialization::Status status) {
12801280
case swift::serialization::Status::RevisionIncompatible:
12811281
return "The module file was built with library evolution enabled by a "
12821282
"different version of the compiler.";
1283+
case swift::serialization::Status::NotInOSSA:
1284+
return "The module file was not built with -enable-ossa-modules";
12831285
}
12841286
}
12851287

@@ -1367,7 +1369,7 @@ static bool DeserializeAllCompilerFlags(swift::CompilerInvocation &invocation,
13671369
for (; !buf.empty(); buf = buf.substr(info.bytes)) {
13681370
swift::serialization::ExtendedValidationInfo extended_validation_info;
13691371
info = swift::serialization::validateSerializedAST(
1370-
buf, &extended_validation_info);
1372+
buf, invocation.getSILOptions().EnableOSSAModules, &extended_validation_info);
13711373
bool invalid_ast = info.status != swift::serialization::Status::Valid;
13721374
bool invalid_size = (info.bytes == 0) || (info.bytes > buf.size());
13731375
bool invalid_name = info.name.empty();
@@ -3391,9 +3393,9 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
33913393

33923394
LLDB_SCOPED_TIMER();
33933395
m_ast_context_ap.reset(swift::ASTContext::get(
3394-
GetLanguageOptions(), GetTypeCheckerOptions(), GetSearchPathOptions(),
3395-
GetClangImporterOptions(), GetSymbolGraphOptions(),
3396-
GetSourceManager(), GetDiagnosticEngine()));
3396+
GetLanguageOptions(), GetTypeCheckerOptions(), GetSILOptions(),
3397+
GetSearchPathOptions(), GetClangImporterOptions(),
3398+
GetSymbolGraphOptions(), GetSourceManager(), GetDiagnosticEngine()));
33973399
m_diagnostic_consumer_ap.reset(new StoringDiagnosticConsumer(*this));
33983400

33993401
if (getenv("LLDB_SWIFT_DUMP_DIAGS")) {

0 commit comments

Comments
 (0)