[llvm-branch-commits] [llvm] [DirectX] Improve error accumulation in root signature parsing (PR #144465)

Chris B via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jul 11 12:04:37 PDT 2025


llvm-beanz wrote:

Looking at this PR and https://github.com/llvm/llvm-project/pull/144577 led me to look a bit more at the code around this.

I think the way you're handling errors in this code is a bit sub-optimal. Instead of having a bunch of report functions and chains of functions returning `bool`, you could instead have the functions return `llvm::Error` and use `joinErrors` to build up chains of errors which you can then choose to report at a higher level in the API.

The LLVM Programmers Manual has a good section about `llvm::Error`: https://llvm.org/docs/ProgrammersManual.html#id23

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


More information about the llvm-branch-commits mailing list