@@ -2486,10 +2486,10 @@ constexpr ExecutionContextScope *g_no_exe_ctx = nullptr;
2486
2486
2487
2487
#define FORWARD_TO_EXPRAST_ONLY (FUNC, ARGS, DEFAULT_RETVAL ) \
2488
2488
do { \
2489
- auto target_sp = GetTargetWP ().lock (); \
2490
- if (auto *swift_ast_ctx = GetSwiftASTContext ( \
2491
- SymbolContext (target_sp, target_sp->GetExecutableModule ()))) \
2492
- return swift_ast_ctx->FUNC ARGS; \
2489
+ if ( auto target_sp = GetTargetWP ().lock ()) \
2490
+ if (auto *swift_ast_ctx = GetSwiftASTContext ( \
2491
+ SymbolContext (target_sp, target_sp->GetExecutableModule ()))) \
2492
+ return swift_ast_ctx->FUNC ARGS; \
2493
2493
return DEFAULT_RETVAL; \
2494
2494
} while (0 )
2495
2495
@@ -2898,16 +2898,14 @@ uint32_t TypeSystemSwiftTypeRef::GetTypeInfo(
2898
2898
NodePointer node = dem.demangleSymbol (AsMangledName (type));
2899
2899
bool unresolved_typealias = false ;
2900
2900
uint32_t flags = CollectTypeInfo (dem, node, unresolved_typealias);
2901
- if (unresolved_typealias) {
2902
- auto target_sp = GetTargetWP ().lock ();
2903
- if (auto *swift_ast_ctx = GetSwiftASTContext (
2904
- SymbolContext (target_sp, target_sp->GetExecutableModule ()))) {
2905
- // If this is a typealias defined in the expression evaluator,
2906
- // then we don't have debug info to resolve it from.
2907
- return swift_ast_ctx->GetTypeInfo (ReconstructType (type),
2908
- pointee_or_element_clang_type);
2909
- }
2910
- }
2901
+ if (unresolved_typealias)
2902
+ if (auto target_sp = GetTargetWP ().lock ())
2903
+ if (auto *swift_ast_ctx = GetSwiftASTContext (
2904
+ SymbolContext (target_sp, target_sp->GetExecutableModule ())))
2905
+ // If this is a typealias defined in the expression evaluator,
2906
+ // then we don't have debug info to resolve it from.
2907
+ return swift_ast_ctx->GetTypeInfo (ReconstructType (type),
2908
+ pointee_or_element_clang_type);
2911
2909
return flags;
2912
2910
};
2913
2911
0 commit comments