[Lldb-commits] [lldb] [lldb][lldb-dap] Return optional from json utils (PR #129919)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 6 09:06:02 PST 2025


JDevlieghere wrote:

The two commits that change `GetSigned` and `GetUnsigned` are no longer necessary after #129823. The commit that updates `GetString` looks fine. 

Thinking out loud: I see a handful of cases where we can check the optional (like should we pass "--launch-target" if there's no value). On the other hand, I think in the majority of cases, we don't really care about the value being empty or not set, but the new API is strictly more powerful. If we wanted to streamline the latter, we could have an overload with the empty string as the default value. If someone wants to specify anything else, they should use the `value_or` API. 

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


More information about the lldb-commits mailing list