Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3104,6 +3104,10 @@ swift::symbolgraphgen::SymbolGraphOptions &SwiftASTContext::GetSymbolGraphOption
return GetCompilerInvocation().getSymbolGraphOptions();
}

swift::CASOptions &SwiftASTContext::GetCASOptions() {
return GetCompilerInvocation().getCASOptions();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the CAS options get serialized in the Swift module together with the rest of the invocation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually have a follow up patch to include that in the context hash. Does debugger need something from CASOption to be serialized into module?

}

swift::DiagnosticEngine &SwiftASTContext::GetDiagnosticEngine() {
if (!m_diagnostic_engine_ap) {
m_diagnostic_engine_ap.reset(
Expand Down Expand Up @@ -3293,7 +3297,8 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
m_ast_context_ap.reset(swift::ASTContext::get(
GetLanguageOptions(), GetTypeCheckerOptions(), GetSILOptions(),
GetSearchPathOptions(), GetClangImporterOptions(),
GetSymbolGraphOptions(), GetSourceManager(), GetDiagnosticEngine(),
GetSymbolGraphOptions(), GetCASOptions(), GetSourceManager(),
GetDiagnosticEngine(),
/*OutputBackend=*/nullptr));

if (getenv("LLDB_SWIFT_DUMP_DIAGS")) {
Expand Down
3 changes: 3 additions & 0 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct TBDGenOptions;
class VarDecl;
class ModuleDecl;
class SourceFile;
class CASOptions;
struct PrintOptions;
class MemoryBufferSerializedModuleLoader;
namespace Demangle {
Expand Down Expand Up @@ -238,6 +239,8 @@ class SwiftASTContext : public TypeSystemSwift {

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

swift::CASOptions &GetCASOptions();

swift::TypeCheckerOptions &GetTypeCheckerOptions();

swift::DiagnosticEngine &GetDiagnosticEngine();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class ClangNameImporter {
m_compiler_invocation.getSearchPathOptions(),
m_compiler_invocation.getClangImporterOptions(),
m_compiler_invocation.getSymbolGraphOptions(),
m_compiler_invocation.getCASOptions(),
m_source_manager, m_diagnostic_engine));

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