Skip to content

Commit f9786ea

Browse files
cachemeifyoucanadrian-prantl
authored andcommitted
[lldb] Update swift::ASTContext API
Update lldb to use updated swift::ASTContext API. (cherry picked from commit 78aa821)
1 parent d184504 commit f9786ea

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3071,6 +3071,10 @@ swift::symbolgraphgen::SymbolGraphOptions &SwiftASTContext::GetSymbolGraphOption
30713071
return GetCompilerInvocation().getSymbolGraphOptions();
30723072
}
30733073

3074+
swift::CASOptions &SwiftASTContext::GetCASOptions() {
3075+
return GetCompilerInvocation().getCASOptions();
3076+
}
3077+
30743078
swift::DiagnosticEngine &SwiftASTContext::GetDiagnosticEngine() {
30753079
if (!m_diagnostic_engine_ap) {
30763080
m_diagnostic_engine_ap.reset(
@@ -3260,7 +3264,8 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
32603264
m_ast_context_ap.reset(swift::ASTContext::get(
32613265
GetLanguageOptions(), GetTypeCheckerOptions(), GetSILOptions(),
32623266
GetSearchPathOptions(), GetClangImporterOptions(),
3263-
GetSymbolGraphOptions(), GetSourceManager(), GetDiagnosticEngine(),
3267+
GetSymbolGraphOptions(), GetCASOptions(), GetSourceManager(),
3268+
GetDiagnosticEngine(),
32643269
/*OutputBackend=*/nullptr));
32653270

32663271
if (getenv("LLDB_SWIFT_DUMP_DIAGS")) {

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ struct TBDGenOptions;
4545
class VarDecl;
4646
class ModuleDecl;
4747
class SourceFile;
48+
class CASOptions;
4849
struct PrintOptions;
4950
class MemoryBufferSerializedModuleLoader;
5051
namespace Demangle {
@@ -238,6 +239,8 @@ class SwiftASTContext : public TypeSystemSwift {
238239

239240
swift::symbolgraphgen::SymbolGraphOptions &GetSymbolGraphOptions();
240241

242+
swift::CASOptions &GetCASOptions();
243+
241244
swift::TypeCheckerOptions &GetTypeCheckerOptions();
242245

243246
swift::DiagnosticEngine &GetDiagnosticEngine();

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class ClangNameImporter {
7171
m_compiler_invocation.getSearchPathOptions(),
7272
m_compiler_invocation.getClangImporterOptions(),
7373
m_compiler_invocation.getSymbolGraphOptions(),
74+
m_compiler_invocation.getCASOptions(),
7475
m_source_manager, m_diagnostic_engine));
7576

7677
m_clang_importer = swift::ClangImporter::create(*m_ast_context, "", {}, {});

0 commit comments

Comments
 (0)