[PATCH] D49964: [DWARF] Refactor DWARF classes to use unified error reporting. NFC.
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 31 07:47:26 PDT 2018
JDevlieghere added inline comments.
================
Comment at: include/llvm/DebugInfo/DWARF/DWARFListTable.h:213
if (*OffsetPtr < HeaderOffset || *OffsetPtr >= End)
- return createError("invalid %s list offset 0x%" PRIx32,
+ return createStringError(errc::invalid_argument,
+ "invalid %s list offset 0x%" PRIx32,
----------------
vleschuk wrote:
> JDevlieghere wrote:
> > Although having an inconvertibleErrorCode (as per Lang's comment in the other diff) prevents conversion between errors and error codes, I'm not convinced it's actually needed here. If we don't need the conversion in libDebugInfo (which I think we don't) I'd rather have an inconvertible one instead of whichever is close enough.
> During https://reviews.llvm.org/D49676 it was decided to use convertible error codes in such situations. I think we should have consistent behavior along code sections (in this case style should be similar in all DebugInfo/DWARF* classes).
I'm probably overlooking it, but where exactly in D49676 was this decided? I don't mind per se, but I'd like to understand why we're doing this for future code reviews.
Repository:
rL LLVM
https://reviews.llvm.org/D49964
More information about the llvm-commits
mailing list