[libc][NFC] Move utils/CPP to src/__support/CPP.
authorSiva Chandra Reddy <sivachandra@google.com>
Wed, 27 Oct 2021 18:49:00 +0000 (18:49 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Thu, 28 Oct 2021 15:50:00 +0000 (15:50 +0000)
The idea is to move all pieces related to the actual libc sources to the
"src" directory. This allows downstream users to ship and build just the
"src" directory.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D112653

65 files changed:
libc/fuzzing/math/CMakeLists.txt
libc/fuzzing/math/Compare.h
libc/src/__support/CMakeLists.txt
libc/src/__support/CPP/Array.h [moved from libc/utils/CPP/Array.h with 91% similarity]
libc/src/__support/CPP/ArrayRef.h [moved from libc/utils/CPP/ArrayRef.h with 96% similarity]
libc/src/__support/CPP/Bitset.h [moved from libc/utils/CPP/Bitset.h with 89% similarity]
libc/src/__support/CPP/CMakeLists.txt [moved from libc/utils/CPP/CMakeLists.txt with 100% similarity]
libc/src/__support/CPP/Functional.h [moved from libc/utils/CPP/Functional.h with 84% similarity]
libc/src/__support/CPP/Limits.h [moved from libc/utils/CPP/Limits.h with 93% similarity]
libc/src/__support/CPP/README.md [moved from libc/utils/CPP/README.md with 100% similarity]
libc/src/__support/CPP/StringView.h [moved from libc/utils/CPP/StringView.h with 94% similarity]
libc/src/__support/CPP/TypeTraits.h [moved from libc/utils/CPP/TypeTraits.h with 95% similarity]
libc/src/__support/FPUtil/BasicOperations.h
libc/src/__support/FPUtil/CMakeLists.txt
libc/src/__support/FPUtil/DivisionAndRemainderOperations.h
libc/src/__support/FPUtil/FMA.h
libc/src/__support/FPUtil/FPBits.h
libc/src/__support/FPUtil/Hypot.h
libc/src/__support/FPUtil/ManipulationFunctions.h
libc/src/__support/FPUtil/NearestIntegerOperations.h
libc/src/__support/FPUtil/NormalFloat.h
libc/src/__support/FPUtil/PolyEval.h
libc/src/__support/FPUtil/Sqrt.h
libc/src/__support/FPUtil/SqrtLongDoubleX86.h
libc/src/__support/FPUtil/aarch64/FMA.h
libc/src/__support/FPUtil/generic/FMA.h
libc/src/__support/FPUtil/x86_64/FMA.h
libc/src/__support/integer_operations.h
libc/src/__support/str_conv_utils.h
libc/src/__support/str_to_float.h
libc/src/math/generic/math_utils.h
libc/src/string/CMakeLists.txt
libc/src/string/string_utils.h
libc/src/string/strspn.cpp
libc/test/config/linux/x86_64/syscall_test.cpp
libc/test/src/CMakeLists.txt
libc/test/src/math/CMakeLists.txt
libc/test/src/math/NextAfterTest.h
libc/test/src/math/cosf_test.cpp
libc/test/src/math/sdcomp26094.h
libc/test/src/math/sincosf_test.cpp
libc/test/src/math/sinf_test.cpp
libc/test/src/stdio/fwrite_test.cpp
libc/test/src/string/bzero_test.cpp
libc/test/src/string/memccpy_test.cpp
libc/test/src/string/memcpy_test.cpp
libc/test/src/string/memmove_test.cpp
libc/test/src/string/memory_utils/CMakeLists.txt
libc/test/src/string/memory_utils/elements_test.cpp
libc/test/src/string/memory_utils/memory_access_test.cpp
libc/test/src/string/memory_utils/utils_test.cpp
libc/test/src/string/memset_test.cpp
libc/test/src/string/strncpy_test.cpp
libc/test/utils/CPP/CMakeLists.txt
libc/test/utils/CPP/arrayref_test.cpp
libc/test/utils/CPP/bitset_test.cpp
libc/test/utils/CPP/limits_test.cpp
libc/test/utils/CPP/stringview_test.cpp
libc/test/utils/UnitTest/CMakeLists.txt
libc/utils/CMakeLists.txt
libc/utils/MPFRWrapper/CMakeLists.txt
libc/utils/MPFRWrapper/MPFRUtils.cpp
libc/utils/MPFRWrapper/MPFRUtils.h
libc/utils/UnitTest/CMakeLists.txt
libc/utils/UnitTest/LibcTest.h

index a3d3081..b1e130e 100644 (file)
@@ -46,7 +46,7 @@ add_libc_fuzzer(
     libc.src.math.truncf
     libc.src.math.truncl
     libc.src.__support.FPUtil.fputil
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
 )
 
 add_libc_fuzzer(
index 28ca904..8a794c4 100644 (file)
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_FUZZING_MATH_COMPARE_H
 #define LLVM_LIBC_FUZZING_MATH_COMPARE_H
 
+#include "src/__support/CPP/TypeTraits.h"
 #include "src/__support/FPUtil/FPBits.h"
-#include "utils/CPP/TypeTraits.h"
 
 template <typename T>
 __llvm_libc::cpp::EnableIfType<__llvm_libc::cpp::IsFloatingPointType<T>::Value,
index 1d45206..871c3a4 100644 (file)
@@ -1,3 +1,5 @@
+add_subdirectory(CPP)
+
 add_header_library(
   common
   HDRS
@@ -29,7 +31,7 @@ add_header_library(
     .high_precision_decimal
     libc.include.errno
     libc.src.errno.__errno_location
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
     libc.src.__support.FPUtil.fputil
 )
 
similarity index 91%
rename from libc/utils/CPP/Array.h
rename to libc/src/__support/CPP/Array.h
index c774a9f..e198943 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_UTILS_CPP_ARRAY_H
-#define LLVM_LIBC_UTILS_CPP_ARRAY_H
+#ifndef LLVM_LIBC_SRC_SUPPORT_CPP_ARRAY_H
+#define LLVM_LIBC_SRC_SUPPORT_CPP_ARRAY_H
 
 #include <stddef.h> // For size_t.
 
@@ -49,4 +49,4 @@ template <class T, size_t N> struct Array {
 } // namespace cpp
 } // namespace __llvm_libc
 
-#endif // LLVM_LIBC_UTILS_CPP_ARRAY_H
+#endif // LLVM_LIBC_SRC_SUPPORT_CPP_ARRAY_H
similarity index 96%
rename from libc/utils/CPP/ArrayRef.h
rename to libc/src/__support/CPP/ArrayRef.h
index cad7db9..a9a0910 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_UTILS_CPP_ARRAYREF_H
-#define LLVM_LIBC_UTILS_CPP_ARRAYREF_H
+#ifndef LLVM_LIBC_SRC_SUPPORT_CPP_ARRAYREF_H
+#define LLVM_LIBC_SRC_SUPPORT_CPP_ARRAYREF_H
 
 #include "Array.h"
 #include "TypeTraits.h" //RemoveCVType
@@ -136,4 +136,4 @@ public:
 } // namespace cpp
 } // namespace __llvm_libc
 
-#endif // LLVM_LIBC_UTILS_CPP_ARRAYREF_H
+#endif // LLVM_LIBC_SRC_SUPPORT_CPP_ARRAYREF_H
similarity index 89%
rename from libc/utils/CPP/Bitset.h
rename to libc/src/__support/CPP/Bitset.h
index 304a6fe..e6f5ace 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_UTILS_CPP_BITSET_H
-#define LLVM_LIBC_UTILS_CPP_BITSET_H
+#ifndef LLVM_LIBC_SRC_SUPPORT_CPP_BITSET_H
+#define LLVM_LIBC_SRC_SUPPORT_CPP_BITSET_H
 
 #include <stddef.h> // For size_t.
 #include <stdint.h> // For uintptr_t.
@@ -36,4 +36,4 @@ private:
 } // namespace cpp
 } // namespace __llvm_libc
 
-#endif // LLVM_LIBC_UTILS_CPP_BITSET_H
+#endif // LLVM_LIBC_SRC_SUPPORT_CPP_BITSET_H
similarity index 84%
rename from libc/utils/CPP/Functional.h
rename to libc/src/__support/CPP/Functional.h
index da73e4c..51f6331 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_UTILS_CPP_FUNCTIONAL_H
-#define LLVM_LIBC_UTILS_CPP_FUNCTIONAL_H
+#ifndef LLVM_LIBC_SRC_SUPPORT_CPP_FUNCTIONAL_H
+#define LLVM_LIBC_SRC_SUPPORT_CPP_FUNCTIONAL_H
 
 namespace __llvm_libc {
 namespace cpp {
@@ -27,4 +27,4 @@ public:
 } // namespace cpp
 } // namespace __llvm_libc
 
-#endif // LLVM_LIBC_UTILS_CPP_FUNCTIONAL_H
+#endif // LLVM_LIBC_SRC_SUPPORT_CPP_FUNCTIONAL_H
similarity index 93%
rename from libc/utils/CPP/Limits.h
rename to libc/src/__support/CPP/Limits.h
index 393c3b6..7e5de10 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_UTILS_CPP_LIMITS_H
-#define LLVM_LIBC_UTILS_CPP_LIMITS_H
+#ifndef LLVM_LIBC_SRC_SUPPORT_CPP_LIMITS_H
+#define LLVM_LIBC_SRC_SUPPORT_CPP_LIMITS_H
 
 #include <limits.h>
 
@@ -66,4 +66,4 @@ public:
 } // namespace cpp
 } // namespace __llvm_libc
 
-#endif // LLVM_LIBC_UTILS_CPP_LIMITS_H
+#endif // LLVM_LIBC_SRC_SUPPORT_CPP_LIMITS_H
similarity index 94%
rename from libc/utils/CPP/StringView.h
rename to libc/src/__support/CPP/StringView.h
index 52f61a0..31efc5a 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_UTILS_CPP_STRINGVIEW_H
-#define LLVM_LIBC_UTILS_CPP_STRINGVIEW_H
+#ifndef LLVM_LIBC_SRC_SUPPORT_CPP_STRINGVIEW_H
+#define LLVM_LIBC_SRC_SUPPORT_CPP_STRINGVIEW_H
 
 #include <stddef.h>
 
@@ -96,4 +96,4 @@ public:
 } // namespace cpp
 } // namespace __llvm_libc
 
-#endif // LLVM_LIBC_UTILS_CPP_STRINGVIEW_H
+#endif // LLVM_LIBC_SRC_SUPPORT_CPP_STRINGVIEW_H
similarity index 95%
rename from libc/utils/CPP/TypeTraits.h
rename to libc/src/__support/CPP/TypeTraits.h
index 060d36e..0c542f1 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_UTILS_CPP_TYPETRAITS_H
-#define LLVM_LIBC_UTILS_CPP_TYPETRAITS_H
+#ifndef LLVM_LIBC_SRC_SUPPORT_CPP_TYPETRAITS_H
+#define LLVM_LIBC_SRC_SUPPORT_CPP_TYPETRAITS_H
 
 namespace __llvm_libc {
 namespace cpp {
@@ -74,4 +74,4 @@ template <typename Type> struct IsArithmetic {
 } // namespace cpp
 } // namespace __llvm_libc
 
-#endif // LLVM_LIBC_UTILS_CPP_TYPETRAITS_H
+#endif // LLVM_LIBC_SRC_SUPPORT_CPP_TYPETRAITS_H
index 95debe7..08d7222 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "FPBits.h"
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 namespace __llvm_libc {
 namespace fputil {
index 589b9b5..f47b545 100644 (file)
@@ -33,7 +33,7 @@ add_header_library(
     libc.include.errno
     libc.include.fenv
     libc.src.__support.common
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
 )
 
 add_library(
@@ -48,6 +48,6 @@ target_link_libraries(LibcFPTestHelpers LibcUnitTest)
 add_dependencies(
   LibcFPTestHelpers
   LibcUnitTest
-  libc.utils.CPP.standalone_cpp
+  libc.src.__support.CPP.standalone_cpp
   libc.src.__support.FPUtil.fputil
 )
index abdc388..412ea96 100644 (file)
@@ -13,7 +13,7 @@
 #include "ManipulationFunctions.h"
 #include "NormalFloat.h"
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 namespace __llvm_libc {
 namespace fputil {
index 4161554..c109b34 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_FMA_H
 #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_FMA_H
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 #ifdef __x86_64__
 #include "x86_64/FMA.h"
index 7361bba..b761dd7 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "PlatformDefs.h"
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 #include "FloatProperties.h"
 #include <stdint.h>
index 425a42c..448dc1c 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "BasicOperations.h"
 #include "FPBits.h"
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 namespace __llvm_libc {
 namespace fputil {
index c2504aa..053eae3 100644 (file)
@@ -14,7 +14,7 @@
 #include "NormalFloat.h"
 #include "PlatformDefs.h"
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 #include <limits.h>
 #include <math.h>
index a7c67c9..99e2ba7 100644 (file)
@@ -12,7 +12,7 @@
 #include "FEnvUtils.h"
 #include "FPBits.h"
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 #include <math.h>
 #if math_errhandling & MATH_ERRNO
index 0445403..2c83b81 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "FPBits.h"
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 #include <stdint.h>
 
index 95311ed..ccf4d60 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_POLYEVAL_H
 #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_POLYEVAL_H
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 // Evaluate polynomial using Horner's Scheme:
 // With polyeval(x, a_0, a_1, ..., a_n) = a_n * x^n + ... + a_1 * x + a_0, we
index 041031f..b6c7cc4 100644 (file)
@@ -12,7 +12,7 @@
 #include "FPBits.h"
 #include "PlatformDefs.h"
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 namespace __llvm_libc {
 namespace fputil {
index f4d89b5..98875ba 100644 (file)
@@ -12,7 +12,7 @@
 #include "FPBits.h"
 #include "Sqrt.h"
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 namespace __llvm_libc {
 namespace fputil {
index 7e4c726..bb92144 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_AARCH64_FMA_H
 #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_AARCH64_FMA_H
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 namespace __llvm_libc {
 namespace fputil {
index 6d19ba9..c543a49 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_GENERIC_FMA_H
 #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_GENERIC_FMA_H
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 namespace __llvm_libc {
 namespace fputil {
index 3229b21..59f55a2 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_X86_64_FMA_H
 #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_X86_64_FMA_H
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 namespace __llvm_libc {
 namespace fputil {
index c27a263..e7588f5 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_STDLIB_ABS_UTILS_H
 #define LLVM_LIBC_SRC_STDLIB_ABS_UTILS_H
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 
 namespace __llvm_libc {
 
index 649e3ee..13c800a 100644 (file)
@@ -9,8 +9,8 @@
 #ifndef LIBC_SRC_STDLIB_STDLIB_UTILS_H
 #define LIBC_SRC_STDLIB_STDLIB_UTILS_H
 
+#include "src/__support/CPP/Limits.h"
 #include "src/__support/ctype_utils.h"
-#include "utils/CPP/Limits.h"
 #include <errno.h>
 #include <limits.h>
 
index 67ebf3e..5574858 100644 (file)
@@ -9,12 +9,12 @@
 #ifndef LIBC_SRC_SUPPORT_STR_TO_FLOAT_H
 #define LIBC_SRC_SUPPORT_STR_TO_FLOAT_H
 
+#include "src/__support/CPP/Limits.h"
 #include "src/__support/FPUtil/FPBits.h"
 #include "src/__support/ctype_utils.h"
 #include "src/__support/detailed_powers_of_ten.h"
 #include "src/__support/high_precision_decimal.h"
 #include "src/__support/str_conv_utils.h"
-#include "utils/CPP/Limits.h"
 #include <errno.h>
 
 namespace __llvm_libc {
index 4afddb0..ef86e88 100644 (file)
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_MATH_MATH_UTILS_H
 #define LLVM_LIBC_SRC_MATH_MATH_UTILS_H
 
+#include "src/__support/CPP/TypeTraits.h"
 #include "src/__support/common.h"
-#include "utils/CPP/TypeTraits.h"
 #include <errno.h>
 #include <math.h>
 
index 86c8f0f..923ba09 100644 (file)
@@ -5,7 +5,7 @@ add_header_library(
   HDRS
     string_utils.h
   DEPENDS
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
 )
 
 add_entrypoint_object(
@@ -188,7 +188,7 @@ add_entrypoint_object(
   HDRS
     strspn.h
   DEPENDS
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
 )
 
 add_entrypoint_object(
index 4f179bb..699f65f 100644 (file)
@@ -9,8 +9,8 @@
 #ifndef LIBC_SRC_STRING_STRING_UTILS_H
 #define LIBC_SRC_STRING_STRING_UTILS_H
 
+#include "src/__support/CPP/Bitset.h"
 #include "src/__support/common.h"
-#include "utils/CPP/Bitset.h"
 #include <stddef.h> // size_t
 
 namespace __llvm_libc {
index 893b2c9..8798505 100644 (file)
@@ -8,8 +8,8 @@
 
 #include "src/string/strspn.h"
 
+#include "src/__support/CPP/Bitset.h"
 #include "src/__support/common.h"
-#include "utils/CPP/Bitset.h"
 #include <stddef.h>
 
 namespace __llvm_libc {
index a6746a4..971b571 100644 (file)
@@ -9,7 +9,7 @@
 #include "config/linux/syscall.h"
 #include "utils/UnitTest/Test.h"
 
-#include "utils/CPP/Functional.h"
+#include "src/__support/CPP/Functional.h"
 
 TEST(LlvmLibcX86_64_SyscallTest, APITest) {
   // We only do a signature test here. Actual functionality tests are
index 790bb85..e4f9e49 100644 (file)
@@ -90,7 +90,7 @@ set_target_properties(
 target_include_directories(
   libc-integration-test BEFORE
   PRIVATE
-    "${LIBC_SOURCE_DIR}/utils/CPP"
+    "${LIBC_SOURCE_DIR}/src/__support/CPP"
     "${LIBC_BUILD_DIR}/include"
 )
 target_compile_options(
index 5a7a145..8b1c146 100644 (file)
@@ -12,7 +12,7 @@ add_fp_unittest(
   DEPENDS
     libc.include.errno
     libc.src.math.cosf
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
     libc.src.__support.FPUtil.fputil
 )
 
@@ -40,7 +40,7 @@ add_fp_unittest(
   DEPENDS
     libc.include.errno
     libc.src.math.sinf
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
     libc.src.__support.FPUtil.fputil
 )
 
@@ -68,7 +68,7 @@ add_fp_unittest(
   DEPENDS
     libc.include.errno
     libc.src.math.sincosf
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
     libc.src.__support.FPUtil.fputil
 )
 
index b101e7f..262fcb8 100644 (file)
@@ -9,10 +9,10 @@
 #ifndef LLVM_LIBC_TEST_SRC_MATH_NEXTAFTERTEST_H
 #define LLVM_LIBC_TEST_SRC_MATH_NEXTAFTERTEST_H
 
+#include "src/__support/CPP/TypeTraits.h"
 #include "src/__support/FPUtil/BasicOperations.h"
 #include "src/__support/FPUtil/FPBits.h"
 #include "src/__support/FPUtil/TestHelpers.h"
-#include "utils/CPP/TypeTraits.h"
 #include "utils/UnitTest/Test.h"
 #include <math.h>
 
index ea34f31..de7d5db 100644 (file)
@@ -6,11 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/Array.h"
 #include "src/__support/FPUtil/FPBits.h"
 #include "src/__support/FPUtil/TestHelpers.h"
 #include "src/math/cosf.h"
 #include "test/src/math/sdcomp26094.h"
-#include "utils/CPP/Array.h"
 #include "utils/MPFRWrapper/MPFRUtils.h"
 #include "utils/UnitTest/Test.h"
 #include <math.h>
index 9c7d464..c42c12c 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TEST_SRC_MATH_SDCOMP26094_H
 #define LLVM_LIBC_TEST_SRC_MATH_SDCOMP26094_H
 
-#include "utils/CPP/Array.h"
+#include "src/__support/CPP/Array.h"
 
 #include <stdint.h>
 
index 4e626e8..77fe377 100644 (file)
@@ -6,11 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/Array.h"
 #include "src/__support/FPUtil/FPBits.h"
 #include "src/__support/FPUtil/TestHelpers.h"
 #include "src/math/sincosf.h"
 #include "test/src/math/sdcomp26094.h"
-#include "utils/CPP/Array.h"
 #include "utils/MPFRWrapper/MPFRUtils.h"
 #include "utils/UnitTest/Test.h"
 #include <math.h>
index 344766f..a3620ef 100644 (file)
@@ -6,11 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/Array.h"
 #include "src/__support/FPUtil/FPBits.h"
 #include "src/__support/FPUtil/TestHelpers.h"
 #include "src/math/sinf.h"
 #include "test/src/math/sdcomp26094.h"
-#include "utils/CPP/Array.h"
 #include "utils/MPFRWrapper/MPFRUtils.h"
 #include "utils/UnitTest/Test.h"
 #include <math.h>
index a65555d..9d38d84 100644 (file)
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/Array.h"
 #include "src/stdio/FILE.h"
 #include "src/stdio/fwrite.h"
-#include "utils/CPP/Array.h"
 #include "utils/UnitTest/Test.h"
 
 TEST(LlvmLibcStdio, FWriteBasic) {
index d56af88..a997cbc 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/ArrayRef.h"
 #include "src/string/bzero.h"
-#include "utils/CPP/ArrayRef.h"
 #include "utils/UnitTest/Test.h"
 
 using __llvm_libc::cpp::Array;
index 980c3a0..ac11e33 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/ArrayRef.h"
 #include "src/string/memccpy.h"
-#include "utils/CPP/ArrayRef.h"
 #include "utils/UnitTest/Test.h"
 #include <stddef.h> // For size_t.
 
index fc9b8f3..9a7c9ba 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/ArrayRef.h"
 #include "src/string/memcpy.h"
-#include "utils/CPP/ArrayRef.h"
 #include "utils/UnitTest/Test.h"
 
 using __llvm_libc::cpp::Array;
index 22e0b3b..b922fb4 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/ArrayRef.h"
 #include "src/string/memmove.h"
-#include "utils/CPP/ArrayRef.h"
 #include "utils/UnitTest/Test.h"
 
 class LlvmLibcMemmoveTest : public __llvm_libc::testing::Test {
index 9f2950d..31276f1 100644 (file)
@@ -8,7 +8,7 @@ add_libc_unittest(
     utils_test.cpp
   DEPENDS
     libc.src.string.memory_utils.memory_utils
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
   COMPILE_OPTIONS
     ${LIBC_COMPILE_OPTIONS_NATIVE}
     -ffreestanding
index 120cd6f..0f5f460 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/Array.h"
 #include "src/string/memory_utils/elements.h"
-#include "utils/CPP/Array.h"
 #include "utils/UnitTest/Test.h"
 
 namespace __llvm_libc {
index 4a0bff2..966863d 100644 (file)
@@ -8,9 +8,9 @@
 
 #define LLVM_LIBC_UNITTEST_OBSERVE 1
 
+#include "src/__support/CPP/Array.h"
+#include "src/__support/CPP/ArrayRef.h"
 #include "src/string/memory_utils/elements.h"
-#include "utils/CPP/Array.h"
-#include "utils/CPP/ArrayRef.h"
 #include "utils/UnitTest/Test.h"
 
 #include <stdio.h>
index bb830d3..6b9ece4 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/Array.h"
 #include "src/string/memory_utils/utils.h"
-#include "utils/CPP/Array.h"
 #include "utils/UnitTest/Test.h"
 
 namespace __llvm_libc {
index 147ab1f..c3f65cf 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/ArrayRef.h"
 #include "src/string/memset.h"
-#include "utils/CPP/ArrayRef.h"
 #include "utils/UnitTest/Test.h"
 
 using __llvm_libc::cpp::Array;
index 83f24d5..7bb70e9 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/ArrayRef.h"
 #include "src/string/strncpy.h"
-#include "utils/CPP/ArrayRef.h"
 #include "utils/UnitTest/Test.h"
 #include <stddef.h> // For size_t.
 
index 09c43d6..a4a0eed 100644 (file)
@@ -7,7 +7,7 @@ add_libc_unittest(
   SRCS
     bitset_test.cpp
   DEPENDS
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
 )
 
 add_libc_unittest(
@@ -17,7 +17,7 @@ add_libc_unittest(
   SRCS
     stringview_test.cpp
   DEPENDS
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
 )
 
 add_libc_unittest(
@@ -27,7 +27,7 @@ add_libc_unittest(
   SRCS
     limits_test.cpp
   DEPENDS
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
 )
 
 add_libc_unittest(
@@ -37,5 +37,5 @@ add_libc_unittest(
   SRCS
     arrayref_test.cpp
   DEPENDS
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
 )
index 83dda96..79466c7 100644 (file)
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "utils/CPP/ArrayRef.h"
+#include "src/__support/CPP/ArrayRef.h"
 #include "utils/UnitTest/Test.h"
 
 namespace __llvm_libc {
index 66e608c..4bcddad 100644 (file)
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "utils/CPP/Bitset.h"
+#include "src/__support/CPP/Bitset.h"
 #include "utils/UnitTest/Test.h"
 
 TEST(LlvmLibcBitsetTest, SetBitForSizeEqualToOne) {
index 6904a72..fa0ae38 100644 (file)
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "utils/CPP/Limits.h"
+#include "src/__support/CPP/Limits.h"
 #include "utils/UnitTest/Test.h"
 
 // This just checks against the C spec, almost all implementations will surpass
index b88bcc3..a62cde9 100644 (file)
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "utils/CPP/StringView.h"
+#include "src/__support/CPP/StringView.h"
 #include "utils/UnitTest/Test.h"
 
 TEST(LlvmLibcStringViewTest, InitializeCheck) {
index 68b127a..d677260 100644 (file)
@@ -7,5 +7,5 @@ add_libc_unittest(
   SRCS
     testfilter_test.cpp
   DEPENDS
-    libc.utils.CPP.standalone_cpp
+    libc.src.__support.CPP.standalone_cpp
 )
index a43094c..df79da3 100644 (file)
@@ -1,4 +1,3 @@
-add_subdirectory(CPP)
 add_subdirectory(MPFRWrapper)
 add_subdirectory(testutils)
 add_subdirectory(UnitTest)
index 46621fb..2ef3731 100644 (file)
@@ -3,7 +3,7 @@ if(LIBC_TESTS_CAN_USE_MPFR)
     MPFRUtils.cpp
     MPFRUtils.h
   )
-  add_dependencies(libcMPFRWrapper libc.utils.CPP.standalone_cpp libc.src.__support.FPUtil.fputil LibcUnitTest)
+  add_dependencies(libcMPFRWrapper libc.src.__support.CPP.standalone_cpp libc.src.__support.FPUtil.fputil LibcUnitTest)
   if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
     target_include_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
     target_link_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
index 86305af..8bcaa13 100644 (file)
@@ -8,9 +8,9 @@
 
 #include "MPFRUtils.h"
 
+#include "src/__support/CPP/StringView.h"
 #include "src/__support/FPUtil/FPBits.h"
 #include "src/__support/FPUtil/TestHelpers.h"
-#include "utils/CPP/StringView.h"
 
 #include <cmath>
 #include <memory>
index 4e8dd38..d2ca761 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_UTILS_TESTUTILS_MPFRUTILS_H
 #define LLVM_LIBC_UTILS_TESTUTILS_MPFRUTILS_H
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 #include "utils/UnitTest/Test.h"
 
 #include <stdint.h>
index 3dd79d0..4140c6d 100644 (file)
@@ -5,7 +5,7 @@ add_library(
   LibcTest.h
 )
 target_include_directories(LibcUnitTest PUBLIC ${LIBC_SOURCE_DIR})
-add_dependencies(LibcUnitTest libc.utils.CPP.standalone_cpp)
+add_dependencies(LibcUnitTest libc.src.__support.CPP.standalone_cpp)
 target_link_libraries(LibcUnitTest PUBLIC libc_test_utils)
 
 add_library(
@@ -14,6 +14,6 @@ add_library(
 )
 
 target_include_directories(LibcUnitTestMain PUBLIC ${LIBC_SOURCE_DIR})
-add_dependencies(LibcUnitTestMain LibcUnitTest libc.utils.CPP.standalone_cpp)
+add_dependencies(LibcUnitTestMain LibcUnitTest libc.src.__support.CPP.standalone_cpp)
 target_link_libraries(LibcUnitTestMain PUBLIC LibcUnitTest libc_test_utils)
 
index 8e2eec9..a9dfbcb 100644 (file)
@@ -9,12 +9,12 @@
 #ifndef LLVM_LIBC_UTILS_UNITTEST_LIBCTEST_H
 #define LLVM_LIBC_UTILS_UNITTEST_LIBCTEST_H
 
-// This file can only include headers from utils/CPP/ or utils/testutils. No
-// other headers should be included.
+// This file can only include headers from src/__support/CPP/ or
+// utils/testutils. No other headers should be included.
 
 #include "PlatformDefs.h"
 
-#include "utils/CPP/TypeTraits.h"
+#include "src/__support/CPP/TypeTraits.h"
 #include "utils/testutils/ExecuteFunction.h"
 #include "utils/testutils/StreamWrapper.h"