[llvm] [nfc] Common utility macros for `Error` / `Expect<T>` (PR #92150)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 14:43:41 PDT 2024


https://github.com/dwblaikie commented:

Might be worth a discourse post, if you haven't already made one - while the implementation isn't huge/complex, the ramifications for how code across LLVM is written are not insignificant.

I'd advocate for an LLVM_* prefix, because we'll end up using these in headers and won't want to conflict with code that uses LLVM as a library.

Wouldn't mind more context on how these compare to existing/other solutions, like the one in proto/google linked

Oh, I'd probably do this in two steps - one to introduce the macros and tests for them (& I'd suggest that shouldn't be labeled NFC - we don't usually label core/generic API additions/changes as NFC) and then a separate NFC commit that migrates existing code to use the API.

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


More information about the llvm-commits mailing list