@@ -2262,13 +2262,21 @@ TypeSystemSwiftTypeRef::GetFunctionReturnType(opaque_compiler_type_t type) {
2262
2262
}
2263
2263
size_t
2264
2264
TypeSystemSwiftTypeRef::GetNumMemberFunctions (opaque_compiler_type_t type) {
2265
+ // We forward the call to SwiftASTContext because an implementation of
2266
+ // this function would require it to have an execution context being passed
2267
+ // in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
2268
+ // function will be called much.
2265
2269
if (auto *swift_ast_context = GetSwiftASTContext ())
2266
2270
return swift_ast_context->GetNumMemberFunctions (ReconstructType (type));
2267
2271
return {};
2268
2272
}
2269
2273
TypeMemberFunctionImpl
2270
2274
TypeSystemSwiftTypeRef::GetMemberFunctionAtIndex (opaque_compiler_type_t type,
2271
2275
size_t idx) {
2276
+ // We forward the call to SwiftASTContext because an implementation of
2277
+ // this function would require it to have an execution context being passed
2278
+ // in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
2279
+ // function will be called much.
2272
2280
if (auto *swift_ast_context = GetSwiftASTContext ())
2273
2281
return swift_ast_context->GetMemberFunctionAtIndex (ReconstructType (type),
2274
2282
idx);
@@ -2564,6 +2572,10 @@ CompilerType TypeSystemSwiftTypeRef::GetFieldAtIndex(
2564
2572
opaque_compiler_type_t type, size_t idx, std::string &name,
2565
2573
uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr,
2566
2574
bool *is_bitfield_ptr) {
2575
+ // We forward the call to SwiftASTContext because an implementation of
2576
+ // this function would require it to have an execution context being passed
2577
+ // in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
2578
+ // function will be called much.
2567
2579
LLDB_SCOPED_TIMER ();
2568
2580
if (auto *swift_ast_context = GetSwiftASTContext ())
2569
2581
return swift_ast_context->GetFieldAtIndex (
@@ -3528,12 +3540,20 @@ TypeSystemSwiftTypeRef::GetFullyUnqualifiedType(opaque_compiler_type_t type) {
3528
3540
}
3529
3541
uint32_t
3530
3542
TypeSystemSwiftTypeRef::GetNumDirectBaseClasses (opaque_compiler_type_t type) {
3543
+ // We forward the call to SwiftASTContext because an implementation of
3544
+ // this function would require it to have an execution context being passed
3545
+ // in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
3546
+ // function will be called much.
3531
3547
if (auto *swift_ast_context = GetSwiftASTContext ())
3532
3548
return swift_ast_context->GetNumDirectBaseClasses (ReconstructType (type));
3533
3549
return {};
3534
3550
}
3535
3551
CompilerType TypeSystemSwiftTypeRef::GetDirectBaseClassAtIndex (
3536
3552
opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) {
3553
+ // We forward the call to SwiftASTContext because an implementation of
3554
+ // this function would require it to have an execution context being passed
3555
+ // in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
3556
+ // function will be called much.
3537
3557
if (auto *swift_ast_context = GetSwiftASTContext ())
3538
3558
return swift_ast_context->GetDirectBaseClassAtIndex (ReconstructType (type),
3539
3559
idx, bit_offset_ptr);
0 commit comments