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 | f5457ae5ebdeb012f213018a46dfea196ea1a872 (patch) | |
tree | 7429da284e3b122bb7e79eaf61c585a6ae6b20a0 /test/Headers | |
parent | acc4bb8e6635f972b5ae00d961eb68abadcc7120 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Headers')
-rw-r--r-- | test/Headers/Inputs/usr/include/float.h | 6 | ||||
-rw-r--r-- | test/Headers/float-darwin.c | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/Headers/Inputs/usr/include/float.h b/test/Headers/Inputs/usr/include/float.h new file mode 100644 index 0000000000..9dab891b97 --- /dev/null +++ b/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/test/Headers/float-darwin.c b/test/Headers/float-darwin.c new file mode 100644 index 0000000000..54bac1ac63 --- /dev/null +++ b/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 |