[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 7 14:04:51 PST 2024


jimingham wrote:

> > I would say this differently.  Many clients of the GetNumChildren API are planning to respond the same way to an error and a number of children == 0.
> 
> I haven't done a complete audit, but my expectation for this patch is that the vast majority of users of this API will want to bubble up the error. So I'm seeing this as a transition state, with the goal being to convert all functions that currently use the ValueOr function to also return an Expected.

Cool!  If that ends up not being the case then it would be good to have something that says the distinction doesn't matter, but if this construct vanishes, all the better!

https://github.com/llvm/llvm-project/pull/84219


More information about the lldb-commits mailing list