mentlerd wrote:

> You could add that but wouldn't it be at base "Clone" followed by 
> "SetTypeSynthetic"?

The implementation could be `ValueObject::Clone`, followed by 
`ValueObject::SetSyntheticChildrenOverride`. That makes my example behave in a 
less confusing way to me for all cases:

```python
value = frame.FindVariable("something_with/without_synthetic")
value.IsSynthetic() # true/false

new_value = value.CloneWithTypeSynthetic(bar);
new_value.IsSynthetic() # true
new_value.GetTypeSynthetic() # bar
```

---

Regardless, your explanation about needing to be explicit on which VO (static, 
or synthetic) you wish to re-assign the SCP of also makes sense to me. 

If we go with that route then the only thing that needs fixing is that 
`ValueObjectSynthetic` will have to start respecting the outcome of 
`this->GetSyntheticChildren()` for it's frontend choice.

Which one should it be?

https://github.com/llvm/llvm-project/pull/209056
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to