[PATCH] D53127: Fix declaration of _URC_FATAL_PHASE1_ERROR in libc++abi when compiled with gcc (follow-up of D42242)
Michał Górny via Phabricator
reviews at reviews.llvm.org
Thu Oct 11 01:22:04 PDT 2018
mgorny requested changes to this revision.
mgorny added a comment.
This revision now requires changes to proceed.
To be honest, I'm not really convinced this is the best way to do it. I don't really know why GCC's libunwind doesn't declare those constants, and I have no clue what the implications of forcing them on top of possibly-gcc libunwind might be.
In any case, I think you shouldn't declare them when using clang, at least. Furthermore, I suppose a future version of GCC may bring the missing enum constants, so maybe it'd be best to check whether they're present and define them only when missing (e.g. using a CMake check).
================
Comment at: src/cxa_exception.hpp:31
+#if defined(__arm__) && defined(__GNUC__)
+// missing values from _Unwind_Reason_Code enum
----------------
`__GNUC__` also defined when using clang, so the definitions from clang will be overwritten by this.
Repository:
rCXXA libc++abi
https://reviews.llvm.org/D53127
More information about the libcxx-commits
mailing list