diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt index c44e333645e22..6637ff9d56f4b 100644 --- a/libc/src/__support/CMakeLists.txt +++ b/libc/src/__support/CMakeLists.txt @@ -55,7 +55,7 @@ add_header_library( common HDRS common.h - endian.h + endian_internal.h macros/properties/architectures.h macros/attributes.h macros/properties/cpu_features.h diff --git a/libc/src/__support/HashTable/generic/bitmask_impl.inc b/libc/src/__support/HashTable/generic/bitmask_impl.inc index 6266ac3c84a90..469ddeeed8a85 100644 --- a/libc/src/__support/HashTable/generic/bitmask_impl.inc +++ b/libc/src/__support/HashTable/generic/bitmask_impl.inc @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// #include "src/__support/common.h" -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/__support/endian.h b/libc/src/__support/endian_internal.h similarity index 96% rename from libc/src/__support/endian.h rename to libc/src/__support/endian_internal.h index 8c443fefab5e8..77839ad75455b 100644 --- a/libc/src/__support/endian.h +++ b/libc/src/__support/endian_internal.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_LIBC_SRC___SUPPORT_ENDIAN_H -#define LLVM_LIBC_SRC___SUPPORT_ENDIAN_H +#ifndef LLVM_LIBC_SRC___SUPPORT_ENDIAN_INTERNAL_H +#define LLVM_LIBC_SRC___SUPPORT_ENDIAN_INTERNAL_H #include "common.h" #include "src/__support/macros/config.h" @@ -143,4 +143,4 @@ using Endian = internal::Endian<__BYTE_ORDER__>; } // namespace LIBC_NAMESPACE_DECL -#endif // LLVM_LIBC_SRC___SUPPORT_ENDIAN_H +#endif // LLVM_LIBC_SRC___SUPPORT_ENDIAN_INTERNAL_H diff --git a/libc/src/network/htonl.cpp b/libc/src/network/htonl.cpp index ec3c02e2894f2..681786adea68a 100644 --- a/libc/src/network/htonl.cpp +++ b/libc/src/network/htonl.cpp @@ -8,7 +8,7 @@ #include "src/network/htonl.h" #include "src/__support/common.h" -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/network/htons.cpp b/libc/src/network/htons.cpp index 78416b3a7d1f0..675f53cf4a0ad 100644 --- a/libc/src/network/htons.cpp +++ b/libc/src/network/htons.cpp @@ -8,7 +8,7 @@ #include "src/network/htons.h" #include "src/__support/common.h" -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/network/ntohl.cpp b/libc/src/network/ntohl.cpp index 974b574432ff3..6a309e97fca79 100644 --- a/libc/src/network/ntohl.cpp +++ b/libc/src/network/ntohl.cpp @@ -8,7 +8,7 @@ #include "src/network/ntohl.h" #include "src/__support/common.h" -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/network/ntohs.cpp b/libc/src/network/ntohs.cpp index bb1779f3dcb30..b51ecb93241ca 100644 --- a/libc/src/network/ntohs.cpp +++ b/libc/src/network/ntohs.cpp @@ -8,7 +8,7 @@ #include "src/network/ntohs.h" #include "src/__support/common.h" -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/string/memory_utils/op_generic.h b/libc/src/string/memory_utils/op_generic.h index 89bbea8a2bdd2..da20a84dede4d 100644 --- a/libc/src/string/memory_utils/op_generic.h +++ b/libc/src/string/memory_utils/op_generic.h @@ -26,7 +26,7 @@ #include "src/__support/CPP/array.h" #include "src/__support/CPP/type_traits.h" #include "src/__support/common.h" -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/__support/macros/config.h" #include "src/__support/macros/optimization.h" #include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT64 diff --git a/libc/src/string/memory_utils/utils.h b/libc/src/string/memory_utils/utils.h index 5e5fe593cce77..cae65bddd92f6 100644 --- a/libc/src/string/memory_utils/utils.h +++ b/libc/src/string/memory_utils/utils.h @@ -12,7 +12,7 @@ #include "src/__support/CPP/bit.h" #include "src/__support/CPP/cstddef.h" #include "src/__support/CPP/type_traits.h" -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/__support/macros/attributes.h" // LIBC_INLINE #include "src/__support/macros/config.h" #include "src/__support/macros/properties/architectures.h" diff --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt index 7ad262d5f1f30..e7ab85906a94f 100644 --- a/libc/test/src/__support/CMakeLists.txt +++ b/libc/test/src/__support/CMakeLists.txt @@ -57,11 +57,11 @@ add_libc_test( ) add_libc_test( - endian_test + endian_internal_test SUITE libc-support-tests SRCS - endian_test.cpp + endian_internal_test.cpp DEPENDS libc.src.__support.common ) diff --git a/libc/test/src/__support/endian_test.cpp b/libc/test/src/__support/endian_internal_test.cpp similarity index 97% rename from libc/test/src/__support/endian_test.cpp rename to libc/test/src/__support/endian_internal_test.cpp index 758c13b686946..eab0f376e7495 100644 --- a/libc/test/src/__support/endian_test.cpp +++ b/libc/test/src/__support/endian_internal_test.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/__support/macros/config.h" #include "test/UnitTest/Test.h" diff --git a/libc/test/src/network/htonl_test.cpp b/libc/test/src/network/htonl_test.cpp index d3b930d0b1ea2..f2e2541312c31 100644 --- a/libc/test/src/network/htonl_test.cpp +++ b/libc/test/src/network/htonl_test.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/network/htonl.h" #include "src/network/ntohl.h" #include "test/UnitTest/Test.h" diff --git a/libc/test/src/network/htons_test.cpp b/libc/test/src/network/htons_test.cpp index d38fab8153b97..9668162523ce5 100644 --- a/libc/test/src/network/htons_test.cpp +++ b/libc/test/src/network/htons_test.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/network/htons.h" #include "src/network/ntohs.h" #include "test/UnitTest/Test.h" diff --git a/libc/test/src/network/ntohl_test.cpp b/libc/test/src/network/ntohl_test.cpp index b06f8e19e4f45..b72456b7200e5 100644 --- a/libc/test/src/network/ntohl_test.cpp +++ b/libc/test/src/network/ntohl_test.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/network/htonl.h" #include "src/network/ntohl.h" #include "test/UnitTest/Test.h" diff --git a/libc/test/src/network/ntohs_test.cpp b/libc/test/src/network/ntohs_test.cpp index 654a39662ac9c..1104356076b94 100644 --- a/libc/test/src/network/ntohs_test.cpp +++ b/libc/test/src/network/ntohs_test.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "src/__support/endian.h" +#include "src/__support/endian_internal.h" #include "src/network/htons.h" #include "src/network/ntohs.h" #include "test/UnitTest/Test.h" diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel index 69a0dada23b4c..2573788658d59 100644 --- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel @@ -425,7 +425,7 @@ libc_support_library( name = "__support_common", hdrs = [ "src/__support/common.h", - "src/__support/endian.h", + "src/__support/endian_internal.h", ], deps = [ ":__support_macros_attributes", diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel index fae0482e7f3a5..0698f45ceabc9 100644 --- a/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel @@ -30,8 +30,8 @@ libc_test( # ) libc_test( - name = "endian_test", - srcs = ["endian_test.cpp"], + name = "endian_internal_test", + srcs = ["endian_internal_test.cpp"], deps = ["//libc:__support_common"], )