diff --git a/libc/fuzzing/math/CMakeLists.txt b/libc/fuzzing/math/CMakeLists.txt --- a/libc/fuzzing/math/CMakeLists.txt +++ b/libc/fuzzing/math/CMakeLists.txt @@ -46,7 +46,7 @@ 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( diff --git a/libc/fuzzing/math/Compare.h b/libc/fuzzing/math/Compare.h --- a/libc/fuzzing/math/Compare.h +++ b/libc/fuzzing/math/Compare.h @@ -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 __llvm_libc::cpp::EnableIfType<__llvm_libc::cpp::IsFloatingPointType::Value, diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt --- a/libc/src/__support/CMakeLists.txt +++ b/libc/src/__support/CMakeLists.txt @@ -1,3 +1,5 @@ +add_subdirectory(CPP) + add_header_library( common HDRS @@ -29,7 +31,7 @@ .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 ) diff --git a/libc/utils/CPP/Array.h b/libc/src/__support/CPP/Array.h rename from libc/utils/CPP/Array.h rename to libc/src/__support/CPP/Array.h --- a/libc/utils/CPP/Array.h +++ b/libc/src/__support/CPP/Array.h @@ -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 // For size_t. @@ -49,4 +49,4 @@ } // namespace cpp } // namespace __llvm_libc -#endif // LLVM_LIBC_UTILS_CPP_ARRAY_H +#endif // LLVM_LIBC_SRC_SUPPORT_CPP_ARRAY_H diff --git a/libc/utils/CPP/ArrayRef.h b/libc/src/__support/CPP/ArrayRef.h rename from libc/utils/CPP/ArrayRef.h rename to libc/src/__support/CPP/ArrayRef.h --- a/libc/utils/CPP/ArrayRef.h +++ b/libc/src/__support/CPP/ArrayRef.h @@ -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 @@ } // namespace cpp } // namespace __llvm_libc -#endif // LLVM_LIBC_UTILS_CPP_ARRAYREF_H +#endif // LLVM_LIBC_SRC_SUPPORT_CPP_ARRAYREF_H diff --git a/libc/utils/CPP/Bitset.h b/libc/src/__support/CPP/Bitset.h rename from libc/utils/CPP/Bitset.h rename to libc/src/__support/CPP/Bitset.h --- a/libc/utils/CPP/Bitset.h +++ b/libc/src/__support/CPP/Bitset.h @@ -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 // For size_t. #include // For uintptr_t. @@ -36,4 +36,4 @@ } // namespace cpp } // namespace __llvm_libc -#endif // LLVM_LIBC_UTILS_CPP_BITSET_H +#endif // LLVM_LIBC_SRC_SUPPORT_CPP_BITSET_H diff --git a/libc/utils/CPP/CMakeLists.txt b/libc/src/__support/CPP/CMakeLists.txt rename from libc/utils/CPP/CMakeLists.txt rename to libc/src/__support/CPP/CMakeLists.txt diff --git a/libc/utils/CPP/Functional.h b/libc/src/__support/CPP/Functional.h rename from libc/utils/CPP/Functional.h rename to libc/src/__support/CPP/Functional.h --- a/libc/utils/CPP/Functional.h +++ b/libc/src/__support/CPP/Functional.h @@ -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 @@ } // namespace cpp } // namespace __llvm_libc -#endif // LLVM_LIBC_UTILS_CPP_FUNCTIONAL_H +#endif // LLVM_LIBC_SRC_SUPPORT_CPP_FUNCTIONAL_H diff --git a/libc/utils/CPP/Limits.h b/libc/src/__support/CPP/Limits.h rename from libc/utils/CPP/Limits.h rename to libc/src/__support/CPP/Limits.h --- a/libc/utils/CPP/Limits.h +++ b/libc/src/__support/CPP/Limits.h @@ -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 @@ -66,4 +66,4 @@ } // namespace cpp } // namespace __llvm_libc -#endif // LLVM_LIBC_UTILS_CPP_LIMITS_H +#endif // LLVM_LIBC_SRC_SUPPORT_CPP_LIMITS_H diff --git a/libc/utils/CPP/README.md b/libc/src/__support/CPP/README.md rename from libc/utils/CPP/README.md rename to libc/src/__support/CPP/README.md diff --git a/libc/utils/CPP/StringView.h b/libc/src/__support/CPP/StringView.h rename from libc/utils/CPP/StringView.h rename to libc/src/__support/CPP/StringView.h --- a/libc/utils/CPP/StringView.h +++ b/libc/src/__support/CPP/StringView.h @@ -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 @@ -96,4 +96,4 @@ } // namespace cpp } // namespace __llvm_libc -#endif // LLVM_LIBC_UTILS_CPP_STRINGVIEW_H +#endif // LLVM_LIBC_SRC_SUPPORT_CPP_STRINGVIEW_H diff --git a/libc/utils/CPP/TypeTraits.h b/libc/src/__support/CPP/TypeTraits.h rename from libc/utils/CPP/TypeTraits.h rename to libc/src/__support/CPP/TypeTraits.h --- a/libc/utils/CPP/TypeTraits.h +++ b/libc/src/__support/CPP/TypeTraits.h @@ -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 @@ } // namespace cpp } // namespace __llvm_libc -#endif // LLVM_LIBC_UTILS_CPP_TYPETRAITS_H +#endif // LLVM_LIBC_SRC_SUPPORT_CPP_TYPETRAITS_H diff --git a/libc/src/__support/FPUtil/BasicOperations.h b/libc/src/__support/FPUtil/BasicOperations.h --- a/libc/src/__support/FPUtil/BasicOperations.h +++ b/libc/src/__support/FPUtil/BasicOperations.h @@ -11,7 +11,7 @@ #include "FPBits.h" -#include "utils/CPP/TypeTraits.h" +#include "src/__support/CPP/TypeTraits.h" namespace __llvm_libc { namespace fputil { diff --git a/libc/src/__support/FPUtil/CMakeLists.txt b/libc/src/__support/FPUtil/CMakeLists.txt --- a/libc/src/__support/FPUtil/CMakeLists.txt +++ b/libc/src/__support/FPUtil/CMakeLists.txt @@ -33,7 +33,7 @@ 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 @@ add_dependencies( LibcFPTestHelpers LibcUnitTest - libc.utils.CPP.standalone_cpp + libc.src.__support.CPP.standalone_cpp libc.src.__support.FPUtil.fputil ) diff --git a/libc/src/__support/FPUtil/DivisionAndRemainderOperations.h b/libc/src/__support/FPUtil/DivisionAndRemainderOperations.h --- a/libc/src/__support/FPUtil/DivisionAndRemainderOperations.h +++ b/libc/src/__support/FPUtil/DivisionAndRemainderOperations.h @@ -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 { diff --git a/libc/src/__support/FPUtil/FMA.h b/libc/src/__support/FPUtil/FMA.h --- a/libc/src/__support/FPUtil/FMA.h +++ b/libc/src/__support/FPUtil/FMA.h @@ -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" diff --git a/libc/src/__support/FPUtil/FPBits.h b/libc/src/__support/FPUtil/FPBits.h --- a/libc/src/__support/FPUtil/FPBits.h +++ b/libc/src/__support/FPUtil/FPBits.h @@ -11,7 +11,7 @@ #include "PlatformDefs.h" -#include "utils/CPP/TypeTraits.h" +#include "src/__support/CPP/TypeTraits.h" #include "FloatProperties.h" #include diff --git a/libc/src/__support/FPUtil/Hypot.h b/libc/src/__support/FPUtil/Hypot.h --- a/libc/src/__support/FPUtil/Hypot.h +++ b/libc/src/__support/FPUtil/Hypot.h @@ -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 { diff --git a/libc/src/__support/FPUtil/ManipulationFunctions.h b/libc/src/__support/FPUtil/ManipulationFunctions.h --- a/libc/src/__support/FPUtil/ManipulationFunctions.h +++ b/libc/src/__support/FPUtil/ManipulationFunctions.h @@ -14,7 +14,7 @@ #include "NormalFloat.h" #include "PlatformDefs.h" -#include "utils/CPP/TypeTraits.h" +#include "src/__support/CPP/TypeTraits.h" #include #include diff --git a/libc/src/__support/FPUtil/NearestIntegerOperations.h b/libc/src/__support/FPUtil/NearestIntegerOperations.h --- a/libc/src/__support/FPUtil/NearestIntegerOperations.h +++ b/libc/src/__support/FPUtil/NearestIntegerOperations.h @@ -12,7 +12,7 @@ #include "FEnvUtils.h" #include "FPBits.h" -#include "utils/CPP/TypeTraits.h" +#include "src/__support/CPP/TypeTraits.h" #include #if math_errhandling & MATH_ERRNO diff --git a/libc/src/__support/FPUtil/NormalFloat.h b/libc/src/__support/FPUtil/NormalFloat.h --- a/libc/src/__support/FPUtil/NormalFloat.h +++ b/libc/src/__support/FPUtil/NormalFloat.h @@ -11,7 +11,7 @@ #include "FPBits.h" -#include "utils/CPP/TypeTraits.h" +#include "src/__support/CPP/TypeTraits.h" #include diff --git a/libc/src/__support/FPUtil/PolyEval.h b/libc/src/__support/FPUtil/PolyEval.h --- a/libc/src/__support/FPUtil/PolyEval.h +++ b/libc/src/__support/FPUtil/PolyEval.h @@ -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 diff --git a/libc/src/__support/FPUtil/Sqrt.h b/libc/src/__support/FPUtil/Sqrt.h --- a/libc/src/__support/FPUtil/Sqrt.h +++ b/libc/src/__support/FPUtil/Sqrt.h @@ -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 { diff --git a/libc/src/__support/FPUtil/SqrtLongDoubleX86.h b/libc/src/__support/FPUtil/SqrtLongDoubleX86.h --- a/libc/src/__support/FPUtil/SqrtLongDoubleX86.h +++ b/libc/src/__support/FPUtil/SqrtLongDoubleX86.h @@ -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 { diff --git a/libc/src/__support/FPUtil/aarch64/FMA.h b/libc/src/__support/FPUtil/aarch64/FMA.h --- a/libc/src/__support/FPUtil/aarch64/FMA.h +++ b/libc/src/__support/FPUtil/aarch64/FMA.h @@ -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 { diff --git a/libc/src/__support/FPUtil/generic/FMA.h b/libc/src/__support/FPUtil/generic/FMA.h --- a/libc/src/__support/FPUtil/generic/FMA.h +++ b/libc/src/__support/FPUtil/generic/FMA.h @@ -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 { diff --git a/libc/src/__support/FPUtil/x86_64/FMA.h b/libc/src/__support/FPUtil/x86_64/FMA.h --- a/libc/src/__support/FPUtil/x86_64/FMA.h +++ b/libc/src/__support/FPUtil/x86_64/FMA.h @@ -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 { diff --git a/libc/src/__support/integer_operations.h b/libc/src/__support/integer_operations.h --- a/libc/src/__support/integer_operations.h +++ b/libc/src/__support/integer_operations.h @@ -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 { diff --git a/libc/src/__support/str_conv_utils.h b/libc/src/__support/str_conv_utils.h --- a/libc/src/__support/str_conv_utils.h +++ b/libc/src/__support/str_conv_utils.h @@ -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 #include diff --git a/libc/src/__support/str_to_float.h b/libc/src/__support/str_to_float.h --- a/libc/src/__support/str_to_float.h +++ b/libc/src/__support/str_to_float.h @@ -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 namespace __llvm_libc { diff --git a/libc/src/math/generic/math_utils.h b/libc/src/math/generic/math_utils.h --- a/libc/src/math/generic/math_utils.h +++ b/libc/src/math/generic/math_utils.h @@ -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 #include diff --git a/libc/src/string/CMakeLists.txt b/libc/src/string/CMakeLists.txt --- a/libc/src/string/CMakeLists.txt +++ b/libc/src/string/CMakeLists.txt @@ -5,7 +5,7 @@ HDRS string_utils.h DEPENDS - libc.utils.CPP.standalone_cpp + libc.src.__support.CPP.standalone_cpp ) add_entrypoint_object( @@ -188,7 +188,7 @@ HDRS strspn.h DEPENDS - libc.utils.CPP.standalone_cpp + libc.src.__support.CPP.standalone_cpp ) add_entrypoint_object( diff --git a/libc/src/string/string_utils.h b/libc/src/string/string_utils.h --- a/libc/src/string/string_utils.h +++ b/libc/src/string/string_utils.h @@ -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 // size_t namespace __llvm_libc { diff --git a/libc/src/string/strspn.cpp b/libc/src/string/strspn.cpp --- a/libc/src/string/strspn.cpp +++ b/libc/src/string/strspn.cpp @@ -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 namespace __llvm_libc { diff --git a/libc/test/config/linux/x86_64/syscall_test.cpp b/libc/test/config/linux/x86_64/syscall_test.cpp --- a/libc/test/config/linux/x86_64/syscall_test.cpp +++ b/libc/test/config/linux/x86_64/syscall_test.cpp @@ -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 diff --git a/libc/test/src/CMakeLists.txt b/libc/test/src/CMakeLists.txt --- a/libc/test/src/CMakeLists.txt +++ b/libc/test/src/CMakeLists.txt @@ -90,7 +90,7 @@ 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( diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt --- a/libc/test/src/math/CMakeLists.txt +++ b/libc/test/src/math/CMakeLists.txt @@ -12,7 +12,7 @@ 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 @@ 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 @@ DEPENDS libc.include.errno libc.src.math.sincosf - libc.utils.CPP.standalone_cpp + libc.src.__support.CPP.standalone_cpp libc.src.__support.FPUtil.fputil ) diff --git a/libc/test/src/math/NextAfterTest.h b/libc/test/src/math/NextAfterTest.h --- a/libc/test/src/math/NextAfterTest.h +++ b/libc/test/src/math/NextAfterTest.h @@ -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 diff --git a/libc/test/src/math/cosf_test.cpp b/libc/test/src/math/cosf_test.cpp --- a/libc/test/src/math/cosf_test.cpp +++ b/libc/test/src/math/cosf_test.cpp @@ -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 diff --git a/libc/test/src/math/sdcomp26094.h b/libc/test/src/math/sdcomp26094.h --- a/libc/test/src/math/sdcomp26094.h +++ b/libc/test/src/math/sdcomp26094.h @@ -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 diff --git a/libc/test/src/math/sincosf_test.cpp b/libc/test/src/math/sincosf_test.cpp --- a/libc/test/src/math/sincosf_test.cpp +++ b/libc/test/src/math/sincosf_test.cpp @@ -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 diff --git a/libc/test/src/math/sinf_test.cpp b/libc/test/src/math/sinf_test.cpp --- a/libc/test/src/math/sinf_test.cpp +++ b/libc/test/src/math/sinf_test.cpp @@ -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 diff --git a/libc/test/src/stdio/fwrite_test.cpp b/libc/test/src/stdio/fwrite_test.cpp --- a/libc/test/src/stdio/fwrite_test.cpp +++ b/libc/test/src/stdio/fwrite_test.cpp @@ -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) { diff --git a/libc/test/src/string/bzero_test.cpp b/libc/test/src/string/bzero_test.cpp --- a/libc/test/src/string/bzero_test.cpp +++ b/libc/test/src/string/bzero_test.cpp @@ -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; diff --git a/libc/test/src/string/memccpy_test.cpp b/libc/test/src/string/memccpy_test.cpp --- a/libc/test/src/string/memccpy_test.cpp +++ b/libc/test/src/string/memccpy_test.cpp @@ -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 // For size_t. diff --git a/libc/test/src/string/memcpy_test.cpp b/libc/test/src/string/memcpy_test.cpp --- a/libc/test/src/string/memcpy_test.cpp +++ b/libc/test/src/string/memcpy_test.cpp @@ -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; diff --git a/libc/test/src/string/memmove_test.cpp b/libc/test/src/string/memmove_test.cpp --- a/libc/test/src/string/memmove_test.cpp +++ b/libc/test/src/string/memmove_test.cpp @@ -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 { diff --git a/libc/test/src/string/memory_utils/CMakeLists.txt b/libc/test/src/string/memory_utils/CMakeLists.txt --- a/libc/test/src/string/memory_utils/CMakeLists.txt +++ b/libc/test/src/string/memory_utils/CMakeLists.txt @@ -8,7 +8,7 @@ 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 diff --git a/libc/test/src/string/memory_utils/elements_test.cpp b/libc/test/src/string/memory_utils/elements_test.cpp --- a/libc/test/src/string/memory_utils/elements_test.cpp +++ b/libc/test/src/string/memory_utils/elements_test.cpp @@ -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 { diff --git a/libc/test/src/string/memory_utils/memory_access_test.cpp b/libc/test/src/string/memory_utils/memory_access_test.cpp --- a/libc/test/src/string/memory_utils/memory_access_test.cpp +++ b/libc/test/src/string/memory_utils/memory_access_test.cpp @@ -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 diff --git a/libc/test/src/string/memory_utils/utils_test.cpp b/libc/test/src/string/memory_utils/utils_test.cpp --- a/libc/test/src/string/memory_utils/utils_test.cpp +++ b/libc/test/src/string/memory_utils/utils_test.cpp @@ -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 { diff --git a/libc/test/src/string/memset_test.cpp b/libc/test/src/string/memset_test.cpp --- a/libc/test/src/string/memset_test.cpp +++ b/libc/test/src/string/memset_test.cpp @@ -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; diff --git a/libc/test/src/string/strncpy_test.cpp b/libc/test/src/string/strncpy_test.cpp --- a/libc/test/src/string/strncpy_test.cpp +++ b/libc/test/src/string/strncpy_test.cpp @@ -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 // For size_t. diff --git a/libc/test/utils/CPP/CMakeLists.txt b/libc/test/utils/CPP/CMakeLists.txt --- a/libc/test/utils/CPP/CMakeLists.txt +++ b/libc/test/utils/CPP/CMakeLists.txt @@ -7,7 +7,7 @@ SRCS bitset_test.cpp DEPENDS - libc.utils.CPP.standalone_cpp + libc.src.__support.CPP.standalone_cpp ) add_libc_unittest( @@ -17,7 +17,7 @@ SRCS stringview_test.cpp DEPENDS - libc.utils.CPP.standalone_cpp + libc.src.__support.CPP.standalone_cpp ) add_libc_unittest( @@ -27,7 +27,7 @@ SRCS limits_test.cpp DEPENDS - libc.utils.CPP.standalone_cpp + libc.src.__support.CPP.standalone_cpp ) add_libc_unittest( @@ -37,5 +37,5 @@ SRCS arrayref_test.cpp DEPENDS - libc.utils.CPP.standalone_cpp + libc.src.__support.CPP.standalone_cpp ) diff --git a/libc/test/utils/CPP/arrayref_test.cpp b/libc/test/utils/CPP/arrayref_test.cpp --- a/libc/test/utils/CPP/arrayref_test.cpp +++ b/libc/test/utils/CPP/arrayref_test.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "utils/CPP/ArrayRef.h" +#include "src/__support/CPP/ArrayRef.h" #include "utils/UnitTest/Test.h" namespace __llvm_libc { diff --git a/libc/test/utils/CPP/bitset_test.cpp b/libc/test/utils/CPP/bitset_test.cpp --- a/libc/test/utils/CPP/bitset_test.cpp +++ b/libc/test/utils/CPP/bitset_test.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "utils/CPP/Bitset.h" +#include "src/__support/CPP/Bitset.h" #include "utils/UnitTest/Test.h" TEST(LlvmLibcBitsetTest, SetBitForSizeEqualToOne) { diff --git a/libc/test/utils/CPP/limits_test.cpp b/libc/test/utils/CPP/limits_test.cpp --- a/libc/test/utils/CPP/limits_test.cpp +++ b/libc/test/utils/CPP/limits_test.cpp @@ -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 diff --git a/libc/test/utils/CPP/stringview_test.cpp b/libc/test/utils/CPP/stringview_test.cpp --- a/libc/test/utils/CPP/stringview_test.cpp +++ b/libc/test/utils/CPP/stringview_test.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "utils/CPP/StringView.h" +#include "src/__support/CPP/StringView.h" #include "utils/UnitTest/Test.h" TEST(LlvmLibcStringViewTest, InitializeCheck) { diff --git a/libc/test/utils/UnitTest/CMakeLists.txt b/libc/test/utils/UnitTest/CMakeLists.txt --- a/libc/test/utils/UnitTest/CMakeLists.txt +++ b/libc/test/utils/UnitTest/CMakeLists.txt @@ -7,5 +7,5 @@ SRCS testfilter_test.cpp DEPENDS - libc.utils.CPP.standalone_cpp + libc.src.__support.CPP.standalone_cpp ) diff --git a/libc/utils/CMakeLists.txt b/libc/utils/CMakeLists.txt --- a/libc/utils/CMakeLists.txt +++ b/libc/utils/CMakeLists.txt @@ -1,4 +1,3 @@ -add_subdirectory(CPP) add_subdirectory(MPFRWrapper) add_subdirectory(testutils) add_subdirectory(UnitTest) diff --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt --- a/libc/utils/MPFRWrapper/CMakeLists.txt +++ b/libc/utils/MPFRWrapper/CMakeLists.txt @@ -3,7 +3,7 @@ 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) diff --git a/libc/utils/MPFRWrapper/MPFRUtils.h b/libc/utils/MPFRWrapper/MPFRUtils.h --- a/libc/utils/MPFRWrapper/MPFRUtils.h +++ b/libc/utils/MPFRWrapper/MPFRUtils.h @@ -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 diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp --- a/libc/utils/MPFRWrapper/MPFRUtils.cpp +++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp @@ -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 #include diff --git a/libc/utils/UnitTest/CMakeLists.txt b/libc/utils/UnitTest/CMakeLists.txt --- a/libc/utils/UnitTest/CMakeLists.txt +++ b/libc/utils/UnitTest/CMakeLists.txt @@ -5,7 +5,7 @@ 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 @@ ) 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) diff --git a/libc/utils/UnitTest/LibcTest.h b/libc/utils/UnitTest/LibcTest.h --- a/libc/utils/UnitTest/LibcTest.h +++ b/libc/utils/UnitTest/LibcTest.h @@ -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"