[PATCH] D34136: [Solaris] replace Solaris.h hack with a set of better hacks

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 06:00:35 PDT 2017


ro added inline comments.


================
Comment at: include/llvm/Support/Host.h:25
+#elif defined(__sun)
+/* Solaris doesn't have endian.h. SPARC is the only supported big-endian ISA. */
+#define BIG_ENDIAN 4321
----------------
joerg wrote:
> Can't you use sys/byteorder.h or is that post-Solaris11?
Wouldn't it be better to just switch LLVM to always use
__BYTE_ORDER__, __ORDER_LITTLE_ENDIAN__, __ORDER_BIG_ENDIAN__ which are predefined by
both clang and gcc?  There are only a few files left using
BYTE_ORDER and friends.


https://reviews.llvm.org/D34136





More information about the llvm-commits mailing list