[PATCH] D87987: [llvm-objcopy][NFC] allow to redefine error handling.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 01:25:17 PDT 2020
jhenderson added a comment.
Do we actually have any non-fatal errors in llvm-objcopy etc currently? If not, I think a better approach would be to simply bubble up the errors via Expected and Error usage, and handle the failures in the client code directly. The client code could then choose to either report them as errors (or warnings) and/or abort what it was doing. I imagine in the case of dwarfutil, you'd be best off aborting optimizing a given CU's debug data if it looked dodgy somehow, in which case, you don't need to distinguish between different classes of errors. This is the approach we take in our downstream port for our debug line rewriting that we've implemented.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87987/new/
https://reviews.llvm.org/D87987
More information about the llvm-commits
mailing list