[Lldb-commits] [lldb] [lldb] All ValueObjectSP instances are now valid (non-null) but have an error state (In-progress | Take 2) (PR #77375)

via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 9 11:11:53 PST 2024


jimingham wrote:

I don't understand why step 2 is necessary; what does the optional actually add?  Is there a useful distinction between "I got an optional<ValueObjectSP> that was empty" and "I got a ValueObjectSP with an error"?  I didn't see any places where you use that distinction.  

Returning the optional is also awkward because we either have to check that the optional had a value and THEN check that GetError().Success() returns true, which is awkward, or we have to add the rule that if an optional return is not empty, then the ValueObjectSP is not in the error state, which is also a bit odd.

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


More information about the lldb-commits mailing list