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

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 06:23:08 PDT 2017


fedor.sergeev marked an inline comment as done.
fedor.sergeev 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
----------------
ro wrote:
> 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.
sys/byteorder.h on my Solaris11/Solaris12 provides only #define _LITTLE_ENDIAN/_BIG_ENDIAN, which does not really help.



https://reviews.llvm.org/D34136





More information about the llvm-commits mailing list