Skip to content

Commit 6456e03

Browse files
committed
SwiftASTContext: allow deserializing @_implementationOnly dependencies to avoid crashing
rdar://65570721
1 parent 03a20a7 commit 6456e03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,10 @@ SwiftASTContext::SwiftASTContext(std::string description, llvm::Triple triple,
930930
ir_gen_opts.OutputKind = swift::IRGenOutputKind::Module;
931931
ir_gen_opts.UseJIT = true;
932932
ir_gen_opts.DWARFVersion = swift::DWARFVersion;
933+
// Allow deserializing @_implementationOnly dependencies
934+
// to avoid crashing due to module recovery issues.
935+
swift::LangOptions &lang_opts = m_compiler_invocation_ap->getLangOptions();
936+
lang_opts.AllowDeserializingImplementationOnly = true;
933937
}
934938

935939
SwiftASTContext::~SwiftASTContext() {

0 commit comments

Comments
 (0)