summaryrefslogtreecommitdiff
path: root/include/llvm/Support/Solaris.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/Solaris.h')
-rw-r--r--include/llvm/Support/Solaris.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Support/Solaris.h b/include/llvm/Support/Solaris.h
index 6228c4b43b..b082285324 100644
--- a/include/llvm/Support/Solaris.h
+++ b/include/llvm/Support/Solaris.h
@@ -17,6 +17,15 @@
#include <sys/types.h>
#include <sys/regset.h>
+/* Solaris doesn't have endian.h. SPARC is the only supported big-endian ISA. */
+#define BIG_ENDIAN 4321
+#define LITTLE_ENDIAN 1234
+#if defined(__sparc) || defined(__sparc__)
+#define BYTE_ORDER BIG_ENDIAN
+#else
+#define BYTE_ORDER LITTLE_ENDIAN
+#endif
+
#undef CS
#undef DS
#undef ES