[Lldb-commits] [lldb] [lldb] Change ValueObject::AddressOf() to return Expected (NFC) (PR #106831)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 11 18:04:29 PDT 2024
jasonmolenda wrote:
> re-ping since It's been more than a week
>
> @jimingham @adrian-prantl
>
> I hope I didn’t come across as too pushy or intrusive.
No Jim was just out a little last week and is catching up still.
I don't have an important opinion here, but I don't know if it adds a lot to have an llvm::Expected for a ValueObjectSP. The methods return an empty shared pointer to indicate that no valueobject was created, e.g.
```
(lldb) scri
>>> sbval = lldb.target.CreateValueFromExpression("var", "5")
>>> sbval
(int) var = 5
>>> sbval.AddressOf()
No value
```
`ValueObject::AddressOf()` always returns a ValueObjectSP, either empty or with a ValueObject in it, so none of these llvm::Expecteds will ever execute their logging message, will they? I'm not sure I see how this improves the API in the case of a shared pointer value. But I haven't used llvm::Expected myself, maybe I'm misunderstanding how it works.
(my approval is not necessary for this, I'm just throwing in my two cents)
https://github.com/llvm/llvm-project/pull/106831
More information about the lldb-commits
mailing list