File tree Expand file tree Collapse file tree 14 files changed +68
-0
lines changed Expand file tree Collapse file tree 14 files changed +68
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ set(TARGET_PUBLIC_HEADERS
2
2
libc.include.ctype
3
3
libc.include.fenv
4
4
libc.include.errno
5
+ libc.include.float
5
6
libc.include.inttypes
6
7
libc.include.math
7
8
libc.include.stdio
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ set(TARGET_PUBLIC_HEADERS
2
2
libc.include.ctype
3
3
libc.include.fenv
4
4
libc.include.errno
5
+ libc.include.float
5
6
libc.include.inttypes
6
7
libc.include.math
7
8
libc.include.stdio
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ set(TARGET_PUBLIC_HEADERS
2
2
libc.include.ctype
3
3
libc.include.errno
4
4
libc.include.fenv
5
+ libc.include.float
5
6
libc.include.inttypes
6
7
libc.include.math
7
8
libc.include.stdlib
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ set(TARGET_PUBLIC_HEADERS
3
3
libc.include.errno
4
4
# Fenv is currently disabled.
5
5
#libc.include.fenv
6
+ libc.include.float
6
7
libc.include.inttypes
7
8
libc.include.math
8
9
libc.include.stdlib
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ set(TARGET_PUBLIC_HEADERS
2
2
libc.include.assert
3
3
libc.include.ctype
4
4
libc.include.string
5
+ libc.include.float
5
6
libc.include.inttypes
6
7
libc.include.math
7
8
libc.include.fenv
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ set(TARGET_PUBLIC_HEADERS
4
4
libc.include.errno
5
5
libc.include.features
6
6
libc.include.fenv
7
+ libc.include.float
7
8
libc.include.inttypes
8
9
libc.include.math
9
10
libc.include.pthread
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ set(TARGET_PUBLIC_HEADERS
2
2
libc.include.ctype
3
3
libc.include.fenv
4
4
libc.include.errno
5
+ libc.include.float
5
6
libc.include.inttypes
6
7
libc.include.math
7
8
libc.include.stdlib
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ set(TARGET_PUBLIC_HEADERS
6
6
libc.include.fcntl
7
7
libc.include.features
8
8
libc.include.fenv
9
+ libc.include.float
9
10
libc.include.inttypes
10
11
libc.include.math
11
12
libc.include.pthread
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ set(TARGET_PUBLIC_HEADERS
6
6
libc.include.fcntl
7
7
libc.include.features
8
8
libc.include.fenv
9
+ libc.include.float
9
10
libc.include.inttypes
10
11
libc.include.math
11
12
libc.include.pthread
Original file line number Diff line number Diff line change @@ -75,6 +75,14 @@ add_gen_header(
75
75
.llvm-libc-types.imaxdiv_t
76
76
)
77
77
78
+ add_gen_header (
79
+ float
80
+ DEF_FILE float.h.def
81
+ GEN_HDR float.h
82
+ DEPENDS
83
+ .llvm-libc-macros.float_macros
84
+ )
85
+
78
86
add_gen_header (
79
87
math
80
88
DEF_FILE math .h.def
Original file line number Diff line number Diff line change
1
+ //===-- C standard library header float.h ---------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #ifndef LLVM_LIBC_FLOAT_H
10
+ #define LLVM_LIBC_FLOAT_H
11
+
12
+ #include <llvm-libc-macros/float-macros.h>
13
+
14
+ #endif // LLVM_LIBC_FLOAT_H
Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ add_macro_header(
67
67
file -seek-macros.h
68
68
)
69
69
70
+ add_macro_header (
71
+ float_macros
72
+ HDR
73
+ float-macros.h
74
+ )
75
+
70
76
add_macro_header (
71
77
math_macros
72
78
HDR
Original file line number Diff line number Diff line change
1
+ //===-- Definition of macros from float.h ---------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #ifndef __LLVM_LIBC_MACROS_FLOAT_MACROS_H
10
+ #define __LLVM_LIBC_MACROS_FLOAT_MACROS_H
11
+
12
+ #undef FLT_MANT_DIG
13
+ #define FLT_MANT_DIG __FLT_MANT_DIG__
14
+
15
+ #undef DBL_MANT_DIG
16
+ #define DBL_MANT_DIG __DBL_MANT_DIG__
17
+
18
+ #undef LDBL_MANT_DIG
19
+ #define LDBL_MANT_DIG __LDBL_MANT_DIG__
20
+
21
+ #endif // __LLVM_LIBC_MACROS_FLOAT_MACROS_H
Original file line number Diff line number Diff line change @@ -847,6 +847,15 @@ def StdC : StandardSpec<"stdc"> {
847
847
]
848
848
>;
849
849
850
+ HeaderSpec Float = HeaderSpec<
851
+ "float.h",
852
+ [
853
+ Macro<"FLT_MANT_DIG">,
854
+ Macro<"DBL_MANT_DIG">,
855
+ Macro<"LDBL_MANT_DIG">,
856
+ ]
857
+ >;
858
+
850
859
NamedType SigAtomicT = NamedType<"sig_atomic_t">;
851
860
HeaderSpec Signal = HeaderSpec<
852
861
"signal.h",
@@ -1149,6 +1158,7 @@ def StdC : StandardSpec<"stdc"> {
1149
1158
CType,
1150
1159
Errno,
1151
1160
Fenv,
1161
+ Float,
1152
1162
Math,
1153
1163
String,
1154
1164
StdIO,
You can’t perform that action at this time.
0 commit comments