[PATCH] D44560: [DWARF] Rework debug line parsing to use llvm::Error and callbacks

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 19 15:28:08 PDT 2018


David Blaikie <dblaikie at gmail.com> writes:

> *nod* seems pretty reasonable to me - I haven't been looking closely at the
> code so far but just took a bit of a look to try to understand the
> difference between what's there and what you're suggesting, Rafael.
>
> If I've got this right - the main thing that'd be simplified by your
> suggested change is to remove the need for the additional complexity of a
> custom Error type while enabling callers that don't care about
> warn-and-continue to stop quickly? (by returning the Error from the handler
> - which isn't provided by the currently proposed patch?)

Correct. Currently we only have errors, and it is always up to the
caller to decide what to ignore. For example, a file not found error can
be ignored of be the reason for an exit(1) depending on the file and the
program. IMHO the same is true for "unsupported version".

Having which errors are fatal be a property of the particular error type
is odd.

Cheers,
Rafael


More information about the llvm-commits mailing list