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