labath wrote:

I'm not sure what to think about that. The principal "result" of this function 
is the `LineEntry` object (most of the call sites don't even use the index), so 
the functional programmer in me wants to make this return an 
`optional<LineEntry>`. However, that doesn't sit very well with the code 
currently calling that function (because they are usually filling in the field 
directly in the SymbolContext). And `optional<uint_32_t>` behaves very much 
like `bool` if you're not interested in the actual index value -- which is 
nice, but then that wouldn't be very consistent with the other functions which 
return UINT32_MAX as a "not found" value.

If, after reading this, you still think this is a good idea, let me know, and 
I'll whip up a patch.

https://github.com/llvm/llvm-project/pull/127799
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to