Skip to content

Commit 3c391a6

Browse files
authored
[libc] Add *_HAS_SUBNORM to float.h (#102182)
Summary: These should be defined, since we provide `float.h` it will override the Clang resource dir and not provide it.
1 parent 6b6abf0 commit 3c391a6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

libc/include/llvm-libc-macros/float-macros.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,18 @@
161161
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
162162
#endif // LDBL_MAX_10_EXP
163163

164+
#ifndef FLT_HAS_SUBNORM
165+
#define FLT_HAS_SUBNORM __FLT_HAS_DENORM__
166+
#endif // FLT_HAS_SUBNORM
167+
168+
#ifndef DBL_HAS_SUBNORM
169+
#define DBL_HAS_SUBNORM __DBL_HAS_DENORM__
170+
#endif // DBL_HAS_SUBNORM
171+
172+
#ifndef LDBL_HAS_SUBNORM
173+
#define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__
174+
#endif // LDBL_HAS_SUBNORM
175+
164176
// TODO: Add FLT16 and FLT128 constants.
165177

166178
#endif // LLVM_LIBC_MACROS_FLOAT_MACROS_H

0 commit comments

Comments
 (0)