Skip to content

Commit 0113c2e

Browse files
committed
Merge pull request #3316 from apple/fixfornewsig
[lldb] Modify call to ASTContext::get as per new signature
1 parent b2632c9 commit 0113c2e

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();
@@ -3350,9 +3352,9 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
33503352

33513353
LLDB_SCOPED_TIMER();
33523354
m_ast_context_ap.reset(swift::ASTContext::get(
3353-
GetLanguageOptions(), GetTypeCheckerOptions(), GetSearchPathOptions(),
3354-
GetClangImporterOptions(), GetSymbolGraphOptions(),
3355-
GetSourceManager(), GetDiagnosticEngine()));
3355+
GetLanguageOptions(), GetTypeCheckerOptions(), GetSILOptions(),
3356+
GetSearchPathOptions(), GetClangImporterOptions(),
3357+
GetSymbolGraphOptions(), GetSourceManager(), GetDiagnosticEngine()));
33563358
m_diagnostic_consumer_ap.reset(new StoringDiagnosticConsumer(*this));
33573359

33583360
if (getenv("LLDB_SWIFT_DUMP_DIAGS")) {

0 commit comments

Comments
 (0)