werat added a comment.

In D98370#2686515 <https://reviews.llvm.org/D98370#2686515>, @jingham wrote:

> If persisting already persistent variables is indeed the only failure case, 
> then I wonder if it wouldn't be more straightforward to just see if the 
> ValueObject is already a persistent variable and have Persist just return the 
> incoming variable.

Persisting already persistent variables is not the only valid use case, one 
might also want to persist variables created via 
`SBTarget::CreateValueFromData()`.

I guess it is currently not clear from the API, but I would expect 
`SBValue::Persist()` to produces a new value every time:

  auto v1 = value.Persist();
  auto v2 = value.Persist();
  
  assert(v1.GetName() != v1.GetName())  // modulo comparing char*...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98370/new/

https://reviews.llvm.org/D98370

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to