[libc-commits] [PATCH] D100571: [libc] Add endianness support
Guillaume Chatelet via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Apr 15 08:46:35 PDT 2021
gchatelet added a comment.
Let me know if you want this header to live somewhere else, or if you had other plans in mind.
Comment at: libc/src/__support/endian.h:30
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define LLVM_LIBC_IS_LITTLE_ENDIAN 1
Here I decided to always define the symbol and set it to 0 or 1 but maybe it's better to leave it undefined. I fear that someone writes `#ifdef LLVM_LIBC_IS_LITTLE_ENDIAN`. It would always be true.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libc-commits