diff options
| author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2016-12-08 02:13:56 +0000 |
|---|---|---|
| committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2016-12-08 02:13:56 +0000 |
| commit | d93779da151a46532353c07b704b8e569ed1c81a (patch) | |
| tree | 5ddb55a78c780c26a00c17f01d1767e4c765d831 /clang/test | |
| parent | fd461fe360c3275effadb0ff5457f5820f07e891 (diff) | |
| download | bcm5719-llvm-d93779da151a46532353c07b704b8e569ed1c81a.tar.gz bcm5719-llvm-d93779da151a46532353c07b704b8e569ed1c81a.zip | |
[Headers] Enable #include_next<float.h> on Darwin
Allows darwin targets to provide additional definitions and
implementation specifc values for float.h
rdar://problem/21961491
llvm-svn: 289018
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Headers/Inputs/usr/include/float.h | 6 | ||||
| -rw-r--r-- | clang/test/Headers/float-darwin.c | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Headers/Inputs/usr/include/float.h b/clang/test/Headers/Inputs/usr/include/float.h new file mode 100644 index 00000000000..9dab891b972 --- /dev/null +++ b/clang/test/Headers/Inputs/usr/include/float.h @@ -0,0 +1,6 @@ +#ifndef SYSFLOAT_H +#define SYSFLOAT_H + +#define FLT_HAS_SUBNORM 1 + +#endif /* SYSFLOAT_H */ diff --git a/clang/test/Headers/float-darwin.c b/clang/test/Headers/float-darwin.c new file mode 100644 index 00000000000..54bac1ac630 --- /dev/null +++ b/clang/test/Headers/float-darwin.c @@ -0,0 +1,13 @@ +// REQUIRES: system-darwin +// RUN: %clang -target x86_64-apple-darwin10 -fsyntax-only -std=c11 -isysroot %S/Inputs %s +#include <float.h> + +// Test the #include_next on float.h works on Darwin. +#ifndef FLT_HAS_SUBNORM + #error "FLT_HAS_SUBNORM not defined" +#endif + +// Test that definition from builtin are also present. +#ifndef FLT_MAX + #error "FLT_MAX not defined" +#endif |

