Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,10 @@ SwiftRuntimeTypeVisitor::VisitImpl(std::optional<unsigned> visit_only,

// Try the instance type metadata.
if (!m_valobj) {
// Static builtin types have no children.
if (ts.IsBuiltinType(m_type))
return 0;

LLDBTypeInfoProvider tip(m_runtime, ts);
auto cti_or_err = reflection_ctx->GetClassInstanceTypeInfo(
*tr, &tip, ts.GetDescriptorFinder());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def test_function_variables(self):
# Get the function pointer variable from our frame
func_ptr_value = self.frame().FindVariable('func_ptr')
self.assertEqual(func_ptr_value.GetNumChildren(), 2)
self.assertEqual(func_ptr_value.GetChildAtIndex(0).GetNumChildren(), 0)
self.assertEqual(func_ptr_value.GetChildAtIndex(1).GetNumChildren(), 0)

# Grab the function pointer value as an unsigned load address
func_ptr_addr = func_ptr_value.GetValueAsUnsigned()
Expand All @@ -46,4 +48,3 @@ def test_function_variables(self):
# Make sure the function pointer correctly resolved to our a.bar
# function
self.assertEqual('a.bar() -> ()', func_ptr_function.name)