[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
Sun Jul 29 08:20:39 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,
----------------
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. 


================
Comment at: lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp:27
-
-namespace llvm {   // workaround for gcc bug
-template <>
----------------
vleschuk wrote:
> @wolfgangp I have compiled new code with gcc (7.2.1) and it compiles correctly and passes all tests. Could you please let me know if we can safely get rid of this workaround here?
We officially support GCC 4.8.0 and later, so whether it compiles with 7.2.1 doesn't really tell us much. I believe we have bots running pretty old versions of GCC so you could try removing and see if any of them are failing (or you get complaints from downstream users). 


Repository:
  rL LLVM

https://reviews.llvm.org/D49964





More information about the llvm-commits mailing list