Skip to content

Commit 53bd411

Browse files
authored
[libc][NFC] rename float.h macro file to types.h (#83190)
1 parent c757ca7 commit 53bd411

28 files changed

+50
-51
lines changed

libc/cmake/modules/compiler_features/check_float128.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "src/__support/macros/properties/float.h"
1+
#include "src/__support/macros/properties/types.h"
22

33
#ifndef LIBC_COMPILER_HAS_FLOAT128
44
#error unsupported

libc/docs/dev/code_style.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ We define two kinds of macros:
4747
e.g., ``LIBC_COMPILER_IS_CLANG``.
4848
* ``cpu_features.h`` - Target cpu feature availability.
4949
e.g., ``LIBC_TARGET_CPU_HAS_AVX2``.
50-
* ``float.h`` - Floating point type properties and availability.
50+
* ``types.h`` - Type properties and availability.
5151
e.g., ``LIBC_COMPILER_HAS_FLOAT128``.
5252
* ``os.h`` - Target os properties.
5353
e.g., ``LIBC_TARGET_OS_IS_LINUX``.

libc/src/__support/CPP/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ add_header_library(
153153
type_traits/type_identity.h
154154
type_traits/void_t.h
155155
DEPENDS
156+
libc.include.llvm-libc-macros.stdfix_macros
156157
libc.src.__support.macros.attributes
157158
libc.src.__support.macros.config
158-
libc.src.__support.macros.properties.float
159-
libc.include.llvm-libc-macros.stdfix_macros
159+
libc.src.__support.macros.properties.types
160160
)
161161

162162
add_header_library(

libc/src/__support/CPP/type_traits/is_floating_point.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "src/__support/CPP/type_traits/is_same.h"
1212
#include "src/__support/CPP/type_traits/remove_cv.h"
1313
#include "src/__support/macros/attributes.h"
14-
#include "src/__support/macros/properties/float.h"
14+
#include "src/__support/macros/properties/types.h"
1515

1616
namespace LIBC_NAMESPACE::cpp {
1717

libc/src/__support/FPUtil/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ add_header_library(
3333
libc.src.__support.CPP.type_traits
3434
libc.src.__support.libc_assert
3535
libc.src.__support.macros.attributes
36-
libc.src.__support.macros.properties.float
36+
libc.src.__support.macros.properties.types
3737
libc.src.__support.math_extras
3838
libc.src.__support.uint128
3939
)

libc/src/__support/FPUtil/FPBits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "src/__support/common.h"
1616
#include "src/__support/libc_assert.h" // LIBC_ASSERT
1717
#include "src/__support/macros/attributes.h" // LIBC_INLINE, LIBC_INLINE_VAR
18-
#include "src/__support/macros/properties/float.h" // LIBC_COMPILER_HAS_FLOAT128
18+
#include "src/__support/macros/properties/types.h" // LIBC_COMPILER_HAS_FLOAT128
1919
#include "src/__support/math_extras.h" // mask_trailing_ones
2020

2121
#include <stdint.h>

libc/src/__support/macros/properties/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ add_header_library(
2525
)
2626

2727
add_header_library(
28-
float
28+
types
2929
HDRS
30-
float.h
30+
types.h
3131
DEPENDS
3232
.architectures
3333
.compiler

libc/src/__support/macros/properties/float.h renamed to libc/src/__support/macros/properties/types.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
//===-- Float type support --------------------------------------*- C++ -*-===//
1+
//===-- Types support -------------------------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// Floating point properties are a combination of compiler support, target OS
9-
// and target architecture.
8+
// Types detection and support.
109

11-
#ifndef LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_FLOAT_H
12-
#define LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_FLOAT_H
10+
#ifndef LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_TYPES_H
11+
#define LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_TYPES_H
1312

1413
#include "llvm-libc-macros/float-macros.h" // LDBL_MANT_DIG
1514
#include "llvm-libc-types/float128.h" // float128
@@ -60,4 +59,4 @@ using float16 = _Float16;
6059
#define LIBC_COMPILER_HAS_FLOAT128
6160
#endif
6261

63-
#endif // LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_FLOAT_H
62+
#endif // LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_TYPES_H

libc/src/math/ceilf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_CEILF128_H
1010
#define LLVM_LIBC_SRC_MATH_CEILF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/copysignf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_COPYSIGNF128_H
1010
#define LLVM_LIBC_SRC_MATH_COPYSIGNF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/fabsf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_FABSF128_H
1010
#define LLVM_LIBC_SRC_MATH_FABSF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/fdimf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_FDIMF128_H
1010
#define LLVM_LIBC_SRC_MATH_FDIMF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/floorf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_FLOORF128_H
1010
#define LLVM_LIBC_SRC_MATH_FLOORF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/fmaxf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_FMAXF128_H
1010
#define LLVM_LIBC_SRC_MATH_FMAXF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/fminf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_FMINF128_H
1010
#define LLVM_LIBC_SRC_MATH_FMINF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/frexpf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_FREXPF128_H
1010
#define LLVM_LIBC_SRC_MATH_FREXPF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/generic/CMakeLists.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ add_entrypoint_object(
4343
COMPILE_OPTIONS
4444
-O3
4545
DEPENDS
46-
libc.src.__support.macros.properties.float
46+
libc.src.__support.macros.properties.types
4747
libc.src.__support.FPUtil.nearest_integer_operations
4848
)
4949

@@ -216,7 +216,7 @@ add_entrypoint_object(
216216
HDRS
217217
../fabsf128.h
218218
DEPENDS
219-
libc.src.__support.macros.properties.float
219+
libc.src.__support.macros.properties.types
220220
libc.src.__support.FPUtil.basic_operations
221221
COMPILE_OPTIONS
222222
-O3
@@ -267,7 +267,7 @@ add_entrypoint_object(
267267
COMPILE_OPTIONS
268268
-O3
269269
DEPENDS
270-
libc.src.__support.macros.properties.float
270+
libc.src.__support.macros.properties.types
271271
libc.src.__support.FPUtil.nearest_integer_operations
272272
)
273273

@@ -316,7 +316,7 @@ add_entrypoint_object(
316316
COMPILE_OPTIONS
317317
-O3
318318
DEPENDS
319-
libc.src.__support.macros.properties.float
319+
libc.src.__support.macros.properties.types
320320
libc.src.__support.FPUtil.nearest_integer_operations
321321
)
322322

@@ -365,7 +365,7 @@ add_entrypoint_object(
365365
COMPILE_OPTIONS
366366
-O3
367367
DEPENDS
368-
libc.src.__support.macros.properties.float
368+
libc.src.__support.macros.properties.types
369369
libc.src.__support.FPUtil.nearest_integer_operations
370370
)
371371

@@ -908,7 +908,7 @@ add_entrypoint_object(
908908
HDRS
909909
../copysignf128.h
910910
DEPENDS
911-
libc.src.__support.macros.properties.float
911+
libc.src.__support.macros.properties.types
912912
libc.src.__support.FPUtil.manipulation_functions
913913
COMPILE_OPTIONS
914914
-O3
@@ -959,7 +959,7 @@ add_entrypoint_object(
959959
COMPILE_OPTIONS
960960
-O3
961961
DEPENDS
962-
libc.src.__support.macros.properties.float
962+
libc.src.__support.macros.properties.types
963963
libc.src.__support.FPUtil.manipulation_functions
964964
)
965965

@@ -1008,7 +1008,7 @@ add_entrypoint_object(
10081008
COMPILE_OPTIONS
10091009
-O3
10101010
DEPENDS
1011-
libc.src.__support.macros.properties.float
1011+
libc.src.__support.macros.properties.types
10121012
libc.src.__support.FPUtil.manipulation_functions
10131013
)
10141014

@@ -1057,7 +1057,7 @@ add_entrypoint_object(
10571057
COMPILE_OPTIONS
10581058
-O3
10591059
DEPENDS
1060-
libc.src.__support.macros.properties.float
1060+
libc.src.__support.macros.properties.types
10611061
libc.src.__support.FPUtil.manipulation_functions
10621062
)
10631063

@@ -1106,7 +1106,7 @@ add_entrypoint_object(
11061106
COMPILE_OPTIONS
11071107
-O3
11081108
DEPENDS
1109-
libc.src.__support.macros.properties.float
1109+
libc.src.__support.macros.properties.types
11101110
libc.src.__support.FPUtil.manipulation_functions
11111111
)
11121112

@@ -1412,7 +1412,7 @@ add_entrypoint_object(
14121412
HDRS
14131413
../fminf128.h
14141414
DEPENDS
1415-
libc.src.__support.macros.properties.float
1415+
libc.src.__support.macros.properties.types
14161416
libc.src.__support.FPUtil.basic_operations
14171417
COMPILE_OPTIONS
14181418
-O3
@@ -1461,7 +1461,7 @@ add_entrypoint_object(
14611461
HDRS
14621462
../fmaxf128.h
14631463
DEPENDS
1464-
libc.src.__support.macros.properties.float
1464+
libc.src.__support.macros.properties.types
14651465
libc.src.__support.FPUtil.basic_operations
14661466
COMPILE_OPTIONS
14671467
-O3
@@ -1510,7 +1510,7 @@ add_entrypoint_object(
15101510
HDRS
15111511
../sqrtf128.h
15121512
DEPENDS
1513-
libc.src.__support.macros.properties.float
1513+
libc.src.__support.macros.properties.types
15141514
libc.src.__support.FPUtil.sqrt
15151515
COMPILE_OPTIONS
15161516
-O3
@@ -1647,7 +1647,7 @@ add_entrypoint_object(
16471647
COMPILE_OPTIONS
16481648
-O3
16491649
DEPENDS
1650-
libc.src.__support.macros.properties.float
1650+
libc.src.__support.macros.properties.types
16511651
libc.src.__support.FPUtil.basic_operations
16521652
)
16531653

libc/src/math/ilogbf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_ILOGBF128_H
1010
#define LLVM_LIBC_SRC_MATH_ILOGBF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/ldexpf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_LDEXPF128_H
1010
#define LLVM_LIBC_SRC_MATH_LDEXPF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/llogb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_LLOGB_H
1010
#define LLVM_LIBC_SRC_MATH_LLOGB_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/llogbf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_LLOGBF_H
1010
#define LLVM_LIBC_SRC_MATH_LLOGBF_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/llogbf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_LLOGBF128_H
1010
#define LLVM_LIBC_SRC_MATH_LLOGBF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/llogbl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_LLOGBL_H
1010
#define LLVM_LIBC_SRC_MATH_LLOGBL_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/logbf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_LOGBF128_H
1010
#define LLVM_LIBC_SRC_MATH_LOGBF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/roundf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_ROUNDF128_H
1010
#define LLVM_LIBC_SRC_MATH_ROUNDF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/sqrtf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_SQRTF128_H
1010
#define LLVM_LIBC_SRC_MATH_SQRTF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/math/truncf128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_MATH_TRUNCF128_H
1010
#define LLVM_LIBC_SRC_MATH_TRUNCF128_H
1111

12-
#include "src/__support/macros/properties/float.h"
12+
#include "src/__support/macros/properties/types.h"
1313

1414
namespace LIBC_NAMESPACE {
1515

0 commit comments

Comments
 (0)