Skip to content

Commit 860affe

Browse files
committed
[lldb] Add message to functions not worth implementing in tss-typeref
1 parent ccd5c84 commit 860affe

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,13 +2262,21 @@ TypeSystemSwiftTypeRef::GetFunctionReturnType(opaque_compiler_type_t type) {
22622262
}
22632263
size_t
22642264
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.
22652269
if (auto *swift_ast_context = GetSwiftASTContext())
22662270
return swift_ast_context->GetNumMemberFunctions(ReconstructType(type));
22672271
return {};
22682272
}
22692273
TypeMemberFunctionImpl
22702274
TypeSystemSwiftTypeRef::GetMemberFunctionAtIndex(opaque_compiler_type_t type,
22712275
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.
22722280
if (auto *swift_ast_context = GetSwiftASTContext())
22732281
return swift_ast_context->GetMemberFunctionAtIndex(ReconstructType(type),
22742282
idx);
@@ -2562,6 +2570,10 @@ CompilerType TypeSystemSwiftTypeRef::GetFieldAtIndex(
25622570
opaque_compiler_type_t type, size_t idx, std::string &name,
25632571
uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr,
25642572
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.
25652577
LLDB_SCOPED_TIMER();
25662578
if (auto *swift_ast_context = GetSwiftASTContext())
25672579
return swift_ast_context->GetFieldAtIndex(
@@ -3555,12 +3567,20 @@ TypeSystemSwiftTypeRef::GetRValueReferenceType(opaque_compiler_type_t type) {
35553567
}
35563568
uint32_t
35573569
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.
35583574
if (auto *swift_ast_context = GetSwiftASTContext())
35593575
return swift_ast_context->GetNumDirectBaseClasses(ReconstructType(type));
35603576
return {};
35613577
}
35623578
CompilerType TypeSystemSwiftTypeRef::GetDirectBaseClassAtIndex(
35633579
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.
35643584
if (auto *swift_ast_context = GetSwiftASTContext())
35653585
return swift_ast_context->GetDirectBaseClassAtIndex(ReconstructType(type),
35663586
idx, bit_offset_ptr);

0 commit comments

Comments
 (0)