@@ -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);
@@ -2562,6 +2570,10 @@ CompilerType TypeSystemSwiftTypeRef::GetFieldAtIndex(
2562
2570
opaque_compiler_type_t type, size_t idx, std::string &name,
2563
2571
uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr,
2564
2572
bool *is_bitfield_ptr) {
2573
+ // We forward the call to SwiftASTContext because an implementation of
2574
+ // this function would require it to have an execution context being passed
2575
+ // in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
2576
+ // function will be called much.
2565
2577
LLDB_SCOPED_TIMER ();
2566
2578
if (auto *swift_ast_context = GetSwiftASTContext ())
2567
2579
return swift_ast_context->GetFieldAtIndex (
@@ -3555,12 +3567,20 @@ TypeSystemSwiftTypeRef::GetRValueReferenceType(opaque_compiler_type_t type) {
3555
3567
}
3556
3568
uint32_t
3557
3569
TypeSystemSwiftTypeRef::GetNumDirectBaseClasses (opaque_compiler_type_t type) {
3570
+ // We forward the call to SwiftASTContext because an implementation of
3571
+ // this function would require it to have an execution context being passed
3572
+ // in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
3573
+ // function will be called much.
3558
3574
if (auto *swift_ast_context = GetSwiftASTContext ())
3559
3575
return swift_ast_context->GetNumDirectBaseClasses (ReconstructType (type));
3560
3576
return {};
3561
3577
}
3562
3578
CompilerType TypeSystemSwiftTypeRef::GetDirectBaseClassAtIndex (
3563
3579
opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) {
3580
+ // We forward the call to SwiftASTContext because an implementation of
3581
+ // this function would require it to have an execution context being passed
3582
+ // in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
3583
+ // function will be called much.
3564
3584
if (auto *swift_ast_context = GetSwiftASTContext ())
3565
3585
return swift_ast_context->GetDirectBaseClassAtIndex (ReconstructType (type),
3566
3586
idx, bit_offset_ptr);
0 commit comments