File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2719,9 +2719,6 @@ llvm::Optional<SwiftScratchContextReader> Target::GetSwiftScratchContext(
2719
2719
2720
2720
auto get_or_create_fallback_context =
2721
2721
[&]() -> TypeSystemSwiftTypeRefForExpressions * {
2722
- if (!lldb_module || !m_use_scratch_typesystem_per_module)
2723
- return nullptr ;
2724
-
2725
2722
ModuleLanguage idx = {lldb_module, lldb::eLanguageTypeSwift};
2726
2723
auto cached = m_scratch_typesystem_for_module.find (idx);
2727
2724
if (cached != m_scratch_typesystem_for_module.end ()) {
@@ -2794,7 +2791,9 @@ llvm::Optional<SwiftScratchContextReader> Target::GetSwiftScratchContext(
2794
2791
return typesystem_sp.get ();
2795
2792
};
2796
2793
2797
- auto *swift_scratch_ctx = get_or_create_fallback_context ();
2794
+ TypeSystemSwiftTypeRefForExpressions *swift_scratch_ctx = nullptr ;
2795
+ if (lldb_module && m_use_scratch_typesystem_per_module)
2796
+ swift_scratch_ctx = get_or_create_fallback_context ();
2798
2797
if (!swift_scratch_ctx) {
2799
2798
if (log)
2800
2799
log->Printf (" returned project-wide scratch context\n " );
You can’t perform that action at this time.
0 commit comments