Skip to content

[libc][NFC] rename float.h macro file to types.h #83190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libc/cmake/modules/compiler_features/check_float128.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion libc/docs/dev/code_style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Expand Down
4 changes: 2 additions & 2 deletions libc/src/__support/CPP/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/CPP/type_traits/is_floating_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/FPUtil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/FPUtil/FPBits.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdint.h>
Expand Down
4 changes: 2 additions & 2 deletions libc/src/__support/macros/properties/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ add_header_library(
)

add_header_library(
float
types
HDRS
float.h
types.h
DEPENDS
.architectures
.compiler
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion libc/src/math/ceilf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/copysignf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fabsf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fdimf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/floorf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fmaxf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fminf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/frexpf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
28 changes: 14 additions & 14 deletions libc/src/math/generic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
)

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/ilogbf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/ldexpf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/llogb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/llogbf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/llogbf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/llogbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/logbf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/roundf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/sqrtf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/truncf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Loading