[PATCH] D82368: [SystemZ/zos] Define Endian constants for z/OS.

Kai Nacke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 05:17:26 PDT 2020


Kai created this revision.
Kai added reviewers: labath, rnk, dschuff, jfb, uweigand, yusra.syeda, kbarton.
Herald added subscribers: llvm-commits, dexonsmith.
Herald added a project: LLVM.

This is needed to build LLVM on z/OS, as there is no header file which provides these constants.


https://reviews.llvm.org/D82368

Files:
  llvm/include/llvm/Support/SwapByteOrder.h


Index: llvm/include/llvm/Support/SwapByteOrder.h
===================================================================
--- llvm/include/llvm/Support/SwapByteOrder.h
+++ llvm/include/llvm/Support/SwapByteOrder.h
@@ -35,6 +35,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>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82368.272680.patch
Type: text/x-patch
Size: 467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200623/64559ec4/attachment-0001.bin>


More information about the llvm-commits mailing list