Skip to content

Commit 42b771c

Browse files
use SymbolGraphOptions when getting swift::ASTContext
1 parent 6ed2b3c commit 42b771c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#include "swift/SIL/SILModule.h"
5555
#include "swift/Sema/IDETypeChecking.h"
5656
#include "swift/Serialization/Validation.h"
57+
#include "swift/SymbolGraphGen/SymbolGraphOptions.h"
5758
#include "clang/AST/ASTContext.h"
5859
#include "clang/AST/DeclObjC.h"
5960
#include "clang/Basic/SourceManager.h"
@@ -2524,6 +2525,10 @@ swift::TypeCheckerOptions &SwiftASTContext::GetTypeCheckerOptions() {
25242525
return GetCompilerInvocation().getTypeCheckerOptions();
25252526
}
25262527

2528+
swift::symbolgraphgen::SymbolGraphOptions &SwiftASTContext::GetSymbolGraphOptions() {
2529+
return GetCompilerInvocation().getSymbolGraphOptions();
2530+
}
2531+
25272532
swift::DiagnosticEngine &SwiftASTContext::GetDiagnosticEngine() {
25282533
if (!m_diagnostic_engine_ap) {
25292534
m_diagnostic_engine_ap.reset(
@@ -3310,7 +3315,7 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
33103315
LLDB_SCOPED_TIMER();
33113316
m_ast_context_ap.reset(swift::ASTContext::get(
33123317
GetLanguageOptions(), GetTypeCheckerOptions(), GetSearchPathOptions(),
3313-
GetClangImporterOptions(),
3318+
GetClangImporterOptions(), GetSymbolGraphOptions(),
33143319
GetSourceManager(), GetDiagnosticEngine()));
33153320
m_diagnostic_consumer_ap.reset(new StoringDiagnosticConsumer(*this));
33163321

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "Plugins/ExpressionParser/Swift/SwiftPersistentExpressionState.h"
1717
#include "Plugins/TypeSystem/Swift/TypeSystemSwift.h"
1818
#include "Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.h"
19+
#include "swift/SymbolGraphGen/SymbolGraphOptions.h"
1920
#include "lldb/Core/SwiftForward.h"
2021
#include "lldb/Core/ThreadSafeDenseMap.h"
2122
#include "lldb/Core/ThreadSafeDenseSet.h"
@@ -209,6 +210,8 @@ class SwiftASTContext : public TypeSystemSwift {
209210

210211
swift::LangOptions &GetLanguageOptions();
211212

213+
swift::symbolgraphgen::SymbolGraphOptions &GetSymbolGraphOptions();
214+
212215
swift::TypeCheckerOptions &GetTypeCheckerOptions();
213216

214217
swift::DiagnosticEngine &GetDiagnosticEngine();

0 commit comments

Comments
 (0)