mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 23:46:05 +00:00

Closes [#124631](https://github.com/llvm/llvm-project/issues/124631). ref: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/endian.h.html This patch adds the implementation of `endian.h`, which includes the header itself and three related macros. These macros in the header rely on the compiler preprocessor, similar to how https://github.com/llvm/llvm-project/blob/main/libc/src/__support/endian_internal.h does. Hopefully this will meet the requirements for compiling llvm with llvm-libc.