@@ -1082,26 +1082,25 @@ SwiftLanguage::GetHardcodedSynthetics() {
1082
1082
1083
1083
casted_to_swift->SetName (ConstString (" Swift_Type" ));
1084
1084
1085
- ValueObjectSP target_valobj ;
1085
+ SyntheticChildrenSP synth_sp ;
1086
1086
if (should_wrap_in_ptr) {
1087
- // If we have a pointer to a Swift value type, dereference it.
1087
+ // If we have a pointer to a Swift value type, dereference the pointer
1088
+ // and present those as the contents instead.
1088
1089
auto children = lldb_private::formatters::swift::
1089
1090
ExtractChildrenFromSwiftPointerValueObject (casted_to_swift);
1090
1091
1091
1092
if (children.empty ())
1092
1093
return nullptr ;
1093
-
1094
1094
// The pointer should only have one child: the pointee.
1095
1095
assert (children.size () == 1 &&
1096
1096
" Unexpected size for pointer's children!" );
1097
- target_valobj = children[0 ];
1097
+
1098
+ synth_sp = SyntheticChildrenSP (new ValueObjectWrapperSyntheticChildren (
1099
+ children[0 ], SyntheticChildren::Flags ()));
1098
1100
} else {
1099
- target_valobj = casted_to_swift;
1101
+ synth_sp = SyntheticChildrenSP (new ValueObjectWrapperSyntheticChildren (
1102
+ casted_to_swift, SyntheticChildren::Flags ()));
1100
1103
}
1101
-
1102
- SyntheticChildrenSP synth_sp =
1103
- SyntheticChildrenSP (new ValueObjectWrapperSyntheticChildren (
1104
- target_valobj, SyntheticChildren::Flags ()));
1105
1104
return synth_sp;
1106
1105
});
1107
1106
g_formatters.push_back ([](lldb_private::ValueObject &valobj,
0 commit comments