diff --git a/libc/cmake/modules/compiler_features/check_float128.cpp b/libc/cmake/modules/compiler_features/check_float128.cpp index 8b1e3fe04ed4e..20f889c14f997 100644 --- a/libc/cmake/modules/compiler_features/check_float128.cpp +++ b/libc/cmake/modules/compiler_features/check_float128.cpp @@ -1,4 +1,4 @@ -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" #ifndef LIBC_COMPILER_HAS_FLOAT128 #error unsupported diff --git a/libc/docs/dev/code_style.rst b/libc/docs/dev/code_style.rst index eeeced0359adb..c76f8874f3aef 100644 --- a/libc/docs/dev/code_style.rst +++ b/libc/docs/dev/code_style.rst @@ -47,7 +47,7 @@ We define two kinds of macros: e.g., ``LIBC_COMPILER_IS_CLANG``. * ``cpu_features.h`` - Target cpu feature availability. e.g., ``LIBC_TARGET_CPU_HAS_AVX2``. - * ``float.h`` - Floating point type properties and availability. + * ``types.h`` - Type properties and availability. e.g., ``LIBC_COMPILER_HAS_FLOAT128``. * ``os.h`` - Target os properties. e.g., ``LIBC_TARGET_OS_IS_LINUX``. diff --git a/libc/src/__support/CPP/CMakeLists.txt b/libc/src/__support/CPP/CMakeLists.txt index d747412791bd8..6c35bc7090819 100644 --- a/libc/src/__support/CPP/CMakeLists.txt +++ b/libc/src/__support/CPP/CMakeLists.txt @@ -153,10 +153,10 @@ add_header_library( type_traits/type_identity.h type_traits/void_t.h DEPENDS + libc.include.llvm-libc-macros.stdfix_macros libc.src.__support.macros.attributes libc.src.__support.macros.config - libc.src.__support.macros.properties.float - libc.include.llvm-libc-macros.stdfix_macros + libc.src.__support.macros.properties.types ) add_header_library( diff --git a/libc/src/__support/CPP/type_traits/is_floating_point.h b/libc/src/__support/CPP/type_traits/is_floating_point.h index 3a5260bcab11e..7f01cc41cae8f 100644 --- a/libc/src/__support/CPP/type_traits/is_floating_point.h +++ b/libc/src/__support/CPP/type_traits/is_floating_point.h @@ -11,7 +11,7 @@ #include "src/__support/CPP/type_traits/is_same.h" #include "src/__support/CPP/type_traits/remove_cv.h" #include "src/__support/macros/attributes.h" -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE::cpp { diff --git a/libc/src/__support/FPUtil/CMakeLists.txt b/libc/src/__support/FPUtil/CMakeLists.txt index 0c932e8ffcd55..f1c6fba22856d 100644 --- a/libc/src/__support/FPUtil/CMakeLists.txt +++ b/libc/src/__support/FPUtil/CMakeLists.txt @@ -33,7 +33,7 @@ add_header_library( libc.src.__support.CPP.type_traits libc.src.__support.libc_assert libc.src.__support.macros.attributes - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.math_extras libc.src.__support.uint128 ) diff --git a/libc/src/__support/FPUtil/FPBits.h b/libc/src/__support/FPUtil/FPBits.h index fb5ff6a4153c9..1703e9a2bb331 100644 --- a/libc/src/__support/FPUtil/FPBits.h +++ b/libc/src/__support/FPUtil/FPBits.h @@ -15,7 +15,7 @@ #include "src/__support/common.h" #include "src/__support/libc_assert.h" // LIBC_ASSERT #include "src/__support/macros/attributes.h" // LIBC_INLINE, LIBC_INLINE_VAR -#include "src/__support/macros/properties/float.h" // LIBC_COMPILER_HAS_FLOAT128 +#include "src/__support/macros/properties/types.h" // LIBC_COMPILER_HAS_FLOAT128 #include "src/__support/math_extras.h" // mask_trailing_ones #include diff --git a/libc/src/__support/macros/properties/CMakeLists.txt b/libc/src/__support/macros/properties/CMakeLists.txt index 3c492ab55a90c..bbc45650f3fca 100644 --- a/libc/src/__support/macros/properties/CMakeLists.txt +++ b/libc/src/__support/macros/properties/CMakeLists.txt @@ -25,9 +25,9 @@ add_header_library( ) add_header_library( - float + types HDRS - float.h + types.h DEPENDS .architectures .compiler diff --git a/libc/src/__support/macros/properties/float.h b/libc/src/__support/macros/properties/types.h similarity index 85% rename from libc/src/__support/macros/properties/float.h rename to libc/src/__support/macros/properties/types.h index 510f392374935..e812a9dfcfd8a 100644 --- a/libc/src/__support/macros/properties/float.h +++ b/libc/src/__support/macros/properties/types.h @@ -1,15 +1,14 @@ -//===-- Float type support --------------------------------------*- C++ -*-===// +//===-- Types support -------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// Floating point properties are a combination of compiler support, target OS -// and target architecture. +// Types detection and support. -#ifndef LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_FLOAT_H -#define LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_FLOAT_H +#ifndef LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_TYPES_H +#define LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_TYPES_H #include "llvm-libc-macros/float-macros.h" // LDBL_MANT_DIG #include "llvm-libc-types/float128.h" // float128 @@ -60,4 +59,4 @@ using float16 = _Float16; #define LIBC_COMPILER_HAS_FLOAT128 #endif -#endif // LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_FLOAT_H +#endif // LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_TYPES_H diff --git a/libc/src/math/ceilf128.h b/libc/src/math/ceilf128.h index db8feffc87ba2..b0c4020718b29 100644 --- a/libc/src/math/ceilf128.h +++ b/libc/src/math/ceilf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_CEILF128_H #define LLVM_LIBC_SRC_MATH_CEILF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/copysignf128.h b/libc/src/math/copysignf128.h index 0eda56a1cebbb..06c194985d720 100644 --- a/libc/src/math/copysignf128.h +++ b/libc/src/math/copysignf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_COPYSIGNF128_H #define LLVM_LIBC_SRC_MATH_COPYSIGNF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/fabsf128.h b/libc/src/math/fabsf128.h index 5999757decfda..0a275025a5cfe 100644 --- a/libc/src/math/fabsf128.h +++ b/libc/src/math/fabsf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_FABSF128_H #define LLVM_LIBC_SRC_MATH_FABSF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/fdimf128.h b/libc/src/math/fdimf128.h index c6f488a586dc0..f0485aba4822c 100644 --- a/libc/src/math/fdimf128.h +++ b/libc/src/math/fdimf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_FDIMF128_H #define LLVM_LIBC_SRC_MATH_FDIMF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/floorf128.h b/libc/src/math/floorf128.h index 86b9a8e9265e1..b97c4b6c6cece 100644 --- a/libc/src/math/floorf128.h +++ b/libc/src/math/floorf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_FLOORF128_H #define LLVM_LIBC_SRC_MATH_FLOORF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/fmaxf128.h b/libc/src/math/fmaxf128.h index 39eaaf616dd5d..a4407d9655afa 100644 --- a/libc/src/math/fmaxf128.h +++ b/libc/src/math/fmaxf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_FMAXF128_H #define LLVM_LIBC_SRC_MATH_FMAXF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/fminf128.h b/libc/src/math/fminf128.h index b3d1bec8e2ad9..d2ed593250a4a 100644 --- a/libc/src/math/fminf128.h +++ b/libc/src/math/fminf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_FMINF128_H #define LLVM_LIBC_SRC_MATH_FMINF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/frexpf128.h b/libc/src/math/frexpf128.h index 5d70860fa1559..55c4a47cc80ca 100644 --- a/libc/src/math/frexpf128.h +++ b/libc/src/math/frexpf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_FREXPF128_H #define LLVM_LIBC_SRC_MATH_FREXPF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt index 120ada8202ab9..82d2a5e66af78 100644 --- a/libc/src/math/generic/CMakeLists.txt +++ b/libc/src/math/generic/CMakeLists.txt @@ -43,7 +43,7 @@ add_entrypoint_object( COMPILE_OPTIONS -O3 DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.nearest_integer_operations ) @@ -216,7 +216,7 @@ add_entrypoint_object( HDRS ../fabsf128.h DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.basic_operations COMPILE_OPTIONS -O3 @@ -267,7 +267,7 @@ add_entrypoint_object( COMPILE_OPTIONS -O3 DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.nearest_integer_operations ) @@ -316,7 +316,7 @@ add_entrypoint_object( COMPILE_OPTIONS -O3 DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.nearest_integer_operations ) @@ -365,7 +365,7 @@ add_entrypoint_object( COMPILE_OPTIONS -O3 DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.nearest_integer_operations ) @@ -908,7 +908,7 @@ add_entrypoint_object( HDRS ../copysignf128.h DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.manipulation_functions COMPILE_OPTIONS -O3 @@ -959,7 +959,7 @@ add_entrypoint_object( COMPILE_OPTIONS -O3 DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.manipulation_functions ) @@ -1008,7 +1008,7 @@ add_entrypoint_object( COMPILE_OPTIONS -O3 DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.manipulation_functions ) @@ -1057,7 +1057,7 @@ add_entrypoint_object( COMPILE_OPTIONS -O3 DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.manipulation_functions ) @@ -1106,7 +1106,7 @@ add_entrypoint_object( COMPILE_OPTIONS -O3 DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.manipulation_functions ) @@ -1412,7 +1412,7 @@ add_entrypoint_object( HDRS ../fminf128.h DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.basic_operations COMPILE_OPTIONS -O3 @@ -1461,7 +1461,7 @@ add_entrypoint_object( HDRS ../fmaxf128.h DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.basic_operations COMPILE_OPTIONS -O3 @@ -1510,7 +1510,7 @@ add_entrypoint_object( HDRS ../sqrtf128.h DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.sqrt COMPILE_OPTIONS -O3 @@ -1647,7 +1647,7 @@ add_entrypoint_object( COMPILE_OPTIONS -O3 DEPENDS - libc.src.__support.macros.properties.float + libc.src.__support.macros.properties.types libc.src.__support.FPUtil.basic_operations ) diff --git a/libc/src/math/ilogbf128.h b/libc/src/math/ilogbf128.h index df1145ffc0f8a..d8fe3b970973c 100644 --- a/libc/src/math/ilogbf128.h +++ b/libc/src/math/ilogbf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_ILOGBF128_H #define LLVM_LIBC_SRC_MATH_ILOGBF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/ldexpf128.h b/libc/src/math/ldexpf128.h index adf9d8f56b356..7aa6ded3c8e4c 100644 --- a/libc/src/math/ldexpf128.h +++ b/libc/src/math/ldexpf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_LDEXPF128_H #define LLVM_LIBC_SRC_MATH_LDEXPF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/llogb.h b/libc/src/math/llogb.h index 2d95877425e56..b51f89fc0416e 100644 --- a/libc/src/math/llogb.h +++ b/libc/src/math/llogb.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_LLOGB_H #define LLVM_LIBC_SRC_MATH_LLOGB_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/llogbf.h b/libc/src/math/llogbf.h index 512e174b66ee4..af4aa8a5b15c0 100644 --- a/libc/src/math/llogbf.h +++ b/libc/src/math/llogbf.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_LLOGBF_H #define LLVM_LIBC_SRC_MATH_LLOGBF_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/llogbf128.h b/libc/src/math/llogbf128.h index 7fb74d4bbe730..ce7c872a63db4 100644 --- a/libc/src/math/llogbf128.h +++ b/libc/src/math/llogbf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_LLOGBF128_H #define LLVM_LIBC_SRC_MATH_LLOGBF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/llogbl.h b/libc/src/math/llogbl.h index 4033100fbe3da..3c323a3af2a93 100644 --- a/libc/src/math/llogbl.h +++ b/libc/src/math/llogbl.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_LLOGBL_H #define LLVM_LIBC_SRC_MATH_LLOGBL_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/logbf128.h b/libc/src/math/logbf128.h index 8baa076af1bfd..7823bbd615b89 100644 --- a/libc/src/math/logbf128.h +++ b/libc/src/math/logbf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_LOGBF128_H #define LLVM_LIBC_SRC_MATH_LOGBF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/roundf128.h b/libc/src/math/roundf128.h index c67c946cc5e8b..e4aca17d7eb63 100644 --- a/libc/src/math/roundf128.h +++ b/libc/src/math/roundf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_ROUNDF128_H #define LLVM_LIBC_SRC_MATH_ROUNDF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/sqrtf128.h b/libc/src/math/sqrtf128.h index bccb6bbb6332d..9da9eb69374cb 100644 --- a/libc/src/math/sqrtf128.h +++ b/libc/src/math/sqrtf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_SQRTF128_H #define LLVM_LIBC_SRC_MATH_SQRTF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/libc/src/math/truncf128.h b/libc/src/math/truncf128.h index c92c8202d4eef..5eb6116551d1c 100644 --- a/libc/src/math/truncf128.h +++ b/libc/src/math/truncf128.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_SRC_MATH_TRUNCF128_H #define LLVM_LIBC_SRC_MATH_TRUNCF128_H -#include "src/__support/macros/properties/float.h" +#include "src/__support/macros/properties/types.h" namespace LIBC_NAMESPACE { diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel index a1a5b7fe9bf40..16ceaadf276fa 100644 --- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel @@ -80,8 +80,8 @@ libc_support_library( ) libc_support_library( - name = "__support_macros_properties_float", - hdrs = ["src/__support/macros/properties/float.h"], + name = "__support_macros_properties_types", + hdrs = ["src/__support/macros/properties/types.h"], deps = [ ":__support_macros_properties_architectures", ":__support_macros_properties_compiler", @@ -332,7 +332,7 @@ libc_support_library( deps = [ ":__support_macros_attributes", ":__support_macros_config", - ":__support_macros_properties_float", + ":__support_macros_properties_types", ":llvm_libc_macros_stdfix_macros", ], ) @@ -697,7 +697,7 @@ libc_support_library( ":__support_cpp_type_traits", ":__support_libc_assert", ":__support_macros_attributes", - ":__support_macros_properties_float", + ":__support_macros_properties_types", ":__support_math_extras", ":__support_uint128", ],