diff options
| author | c8ef <c8ef@outlook.com> | 2025-02-07 09:20:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-07 09:20:18 +0800 |
| commit | 6807164500e9920638e2ab0cdb4bf8321d24f8eb (patch) | |
| tree | 7ab1b399b2b6d79300b1b95a75b54f91cdcb1dfc /libc/utils/docgen | |
| parent | f5b41318b0feb042d51c4e8b66812423ed34b80f (diff) | |
[libc] Add the `<endian.h>` header. (#125168)
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.
Diffstat (limited to 'libc/utils/docgen')
| -rw-r--r-- | libc/utils/docgen/endian.yaml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libc/utils/docgen/endian.yaml b/libc/utils/docgen/endian.yaml new file mode 100644 index 000000000000..f100a1126066 --- /dev/null +++ b/libc/utils/docgen/endian.yaml @@ -0,0 +1,32 @@ +macros: + LITTLE_ENDIAN: + in-latest-posix: '' + BIG_ENDIAN: + in-latest-posix: '' + BYTE_ORDER: + in-latest-posix: '' + be16toh: + in-latest-posix: '' + be32toh: + in-latest-posix: '' + be64toh: + in-latest-posix: '' + htobe16: + in-latest-posix: '' + htobe32: + in-latest-posix: '' + htobe64: + in-latest-posix: '' + htole16: + in-latest-posix: '' + htole32: + in-latest-posix: '' + htole64: + in-latest-posix: '' + le16toh: + in-latest-posix: '' + le32toh: + in-latest-posix: '' + le64toh: + in-latest-posix: '' + |
