[Lldb-commits] [lldb] [lldb] Turn lldb_private::Status into a value type. (PR #106163)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 27 08:51:18 PDT 2024
adrian-prantl wrote:
> I like this. I have just two remarks:
>
> * it might be better to split this into three steps (add new APIs, port to new APIs, remove old APIs), as that will make reverts easier/less disruptive (I don't know how much we can trust pre-commit CI these days, but I wouldn't be surprised if this breaks some platform-specific code).
>From previous experience, I'm convinced that I'm going to break some platform-specific bots with this commit. I like the idea of only reverting the commit that removes the old API while that process is ongoing!
> * since this seems like a perfect opportunity to bikesh^Wdiscuss the names, I'm going to ask if there's any appetite for shortening some of the new factory functions. `Status::FromErrorStringWithFormatv` is a bit of a mouthful, so I was thinking if we could use something shorter instead (`Status::FromFormatv` or even `Status::Formatv`) ?
I picked these names, because they are in line with the old names, which made the regex replacement feasible. Renaming them afterwards is going to be easier.
My 2 cents on the naming: I had `Status::FromFormatv` in a previous iteration of this patch and changed my mind, because it doesn't indicate that this is going to be an error. What do you think about the slightly shorter `Status::ErrorFromFromatv()`?
Or, more radical, and potentially *really confusing* with LLVM code: rename `lldb_private::Status` to `lldb_private::Error`. I don't think I'd like that.
https://github.com/llvm/llvm-project/pull/106163
More information about the lldb-commits
mailing list