Skip to content

[lldb] Add message to functions not worth implementing in tss-typeref #3467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2262,13 +2262,21 @@ TypeSystemSwiftTypeRef::GetFunctionReturnType(opaque_compiler_type_t type) {
}
size_t
TypeSystemSwiftTypeRef::GetNumMemberFunctions(opaque_compiler_type_t type) {
// We forward the call to SwiftASTContext because an implementation of
// this function would require it to have an execution context being passed
// in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
// function will be called much.
if (auto *swift_ast_context = GetSwiftASTContext())
return swift_ast_context->GetNumMemberFunctions(ReconstructType(type));
return {};
}
TypeMemberFunctionImpl
TypeSystemSwiftTypeRef::GetMemberFunctionAtIndex(opaque_compiler_type_t type,
size_t idx) {
// We forward the call to SwiftASTContext because an implementation of
// this function would require it to have an execution context being passed
// in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
// function will be called much.
if (auto *swift_ast_context = GetSwiftASTContext())
return swift_ast_context->GetMemberFunctionAtIndex(ReconstructType(type),
idx);
Expand Down Expand Up @@ -2562,6 +2570,10 @@ CompilerType TypeSystemSwiftTypeRef::GetFieldAtIndex(
opaque_compiler_type_t type, size_t idx, std::string &name,
uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr,
bool *is_bitfield_ptr) {
// We forward the call to SwiftASTContext because an implementation of
// this function would require it to have an execution context being passed
// in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
// function will be called much.
LLDB_SCOPED_TIMER();
if (auto *swift_ast_context = GetSwiftASTContext())
return swift_ast_context->GetFieldAtIndex(
Expand Down Expand Up @@ -3555,12 +3567,20 @@ TypeSystemSwiftTypeRef::GetRValueReferenceType(opaque_compiler_type_t type) {
}
uint32_t
TypeSystemSwiftTypeRef::GetNumDirectBaseClasses(opaque_compiler_type_t type) {
// We forward the call to SwiftASTContext because an implementation of
// this function would require it to have an execution context being passed
// in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
// function will be called much.
if (auto *swift_ast_context = GetSwiftASTContext())
return swift_ast_context->GetNumDirectBaseClasses(ReconstructType(type));
return {};
}
CompilerType TypeSystemSwiftTypeRef::GetDirectBaseClassAtIndex(
opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) {
// We forward the call to SwiftASTContext because an implementation of
// this function would require it to have an execution context being passed
// in. Given the purpose of TypeSystemSwiftTypeRef, it's unlikely this
// function will be called much.
if (auto *swift_ast_context = GetSwiftASTContext())
return swift_ast_context->GetDirectBaseClassAtIndex(ReconstructType(type),
idx, bit_offset_ptr);
Expand Down