Skip to content

Commit 474fb88

Browse files
Merge pull request #11594 from adrian-prantl/Bo-6.2
[LLDB] Remove fallback for Builtin.Object
2 parents 8f7f290 + e336c54 commit 474fb88

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeDynamicTypeResolution.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,10 @@ SwiftRuntimeTypeVisitor::VisitImpl(std::optional<unsigned> visit_only,
10921092

10931093
// Try the instance type metadata.
10941094
if (!m_valobj) {
1095+
// Static builtin types have no children.
1096+
if (ts.IsBuiltinType(m_type))
1097+
return 0;
1098+
10951099
LLDBTypeInfoProvider tip(m_runtime, ts);
10961100
auto cti_or_err = reflection_ctx->GetClassInstanceTypeInfo(
10971101
*tr, &tip, ts.GetDescriptorFinder());

lldb/test/API/lang/swift/variables/func/TestSwiftFunctionVariables.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def test_function_variables(self):
3232
# Get the function pointer variable from our frame
3333
func_ptr_value = self.frame().FindVariable('func_ptr')
3434
self.assertEqual(func_ptr_value.GetNumChildren(), 2)
35+
self.assertEqual(func_ptr_value.GetChildAtIndex(0).GetNumChildren(), 0)
36+
self.assertEqual(func_ptr_value.GetChildAtIndex(1).GetNumChildren(), 0)
3537

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

0 commit comments

Comments
 (0)