Skip to content

Commit 53bd411

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

File tree

28 files changed

+50
-51
lines changed

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

0 commit comments

Comments
 (0)