[llvm] 0663844 - [SystemZ/ZOS] Define Endian constants for z/OS.
Kai Nacke via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 03:49:32 PDT 2020
Author: Kai Nacke
Date: 2020-07-06T06:48:16-04:00
New Revision: 0663844b064dca074cbf12e868b9b3214cf52848
URL: https://github.com/llvm/llvm-project/commit/0663844b064dca074cbf12e868b9b3214cf52848
DIFF: https://github.com/llvm/llvm-project/commit/0663844b064dca074cbf12e868b9b3214cf52848.diff
LOG: [SystemZ/ZOS] Define Endian constants for z/OS.
This is needed to build LLVM on z/OS, as there is no header file
which provides these constants.
Reviewed By: hubert.reinterpretcast
Differential Revision: https://reviews.llvm.org/D82368
Added:
Modified:
llvm/include/llvm/Support/SwapByteOrder.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/SwapByteOrder.h b/llvm/include/llvm/Support/SwapByteOrder.h
index 500df2355307..0e544fc7e71e 100644
--- a/llvm/include/llvm/Support/SwapByteOrder.h
+++ b/llvm/include/llvm/Support/SwapByteOrder.h
@@ -36,6 +36,10 @@
#else
#define BYTE_ORDER LITTLE_ENDIAN
#endif
+#elif defined(__MVS__)
+#define BIG_ENDIAN 4321
+#define LITTLE_ENDIAN 1234
+#define BYTE_ORDER BIG_ENDIAN
#else
#if !defined(BYTE_ORDER) && !defined(_WIN32)
#include <machine/endian.h>
More information about the llvm-commits
mailing list