[libc-commits] [libc] f256c39 - [libc] ifdef guard element architecture implementations
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Fri Oct 8 07:25:36 PDT 2021
Author: Guillaume Chatelet
Date: 2021-10-08T14:25:26Z
New Revision: f256c39541c6ef2cbccb507296d4b58c6c6c1d2b
URL: https://github.com/llvm/llvm-project/commit/f256c39541c6ef2cbccb507296d4b58c6c6c1d2b
DIFF: https://github.com/llvm/llvm-project/commit/f256c39541c6ef2cbccb507296d4b58c6c6c1d2b.diff
LOG: [libc] ifdef guard element architecture implementations
Added:
Modified:
libc/src/string/memory_utils/elements_aarch64.h
libc/src/string/memory_utils/elements_x86.h
Removed:
################################################################################
diff --git a/libc/src/string/memory_utils/elements_aarch64.h b/libc/src/string/memory_utils/elements_aarch64.h
index 366efc181e9a7..36d3074bac5bf 100644
--- a/libc/src/string/memory_utils/elements_aarch64.h
+++ b/libc/src/string/memory_utils/elements_aarch64.h
@@ -9,6 +9,8 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_ELEMENTS_AARCH64_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_ELEMENTS_AARCH64_H
+#if defined(__arm__) || defined(__aarch64__)
+
#include <src/string/memory_utils/elements.h>
#include <stddef.h> // size_t
#include <stdint.h> // uint8_t, uint16_t, uint32_t, uint64_t
@@ -113,4 +115,6 @@ using _32 = __llvm_libc::scalar::_32;
} // namespace aarch64
} // namespace __llvm_libc
+#endif // defined(__arm__) || defined(__aarch64__)
+
#endif // LLVM_LIBC_SRC_STRING_MEMORY_UTILS_ELEMENTS_AARCH64_H
diff --git a/libc/src/string/memory_utils/elements_x86.h b/libc/src/string/memory_utils/elements_x86.h
index 2873fff8b2e22..c7e1ff9017954 100644
--- a/libc/src/string/memory_utils/elements_x86.h
+++ b/libc/src/string/memory_utils/elements_x86.h
@@ -9,6 +9,9 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_ELEMENTS_X86_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_ELEMENTS_X86_H
+#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || \
+ defined(_M_X64)
+
#include <stddef.h> // size_t
#include <stdint.h> // uint8_t, uint16_t, uint32_t, uint64_t
@@ -163,4 +166,7 @@ using _128 = __llvm_libc::Repeated<_8, 16>;
} // namespace x86
} // namespace __llvm_libc
+#endif // defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) ||
+ // defined(_M_X64)
+
#endif // LLVM_LIBC_SRC_STRING_MEMORY_UTILS_ELEMENTS_X86_H
More information about the libc-commits
mailing list