diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-03-16 23:19:00 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-03-16 23:19:00 +0000 |
commit | 4d6eb59efd5dfda74bf2ddd78da9497055bb339f (patch) | |
tree | a1bcc4265b056ae0c577c144f882dcf1c638c043 /test/Headers | |
parent | 6113c885c45be5c67f665a06983b1b8e021d53e2 (diff) |
[Headers] Reapply: Add #include_next for tgmath.h on Darwin
Reapply r289181 but rename the include guard to avoid
conflict with the one from Darwin.
Allow darwin to provide additional definitions and implementation
specifc values for tgmath.h on Apple platforms.
rdar://problem/19019845
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Headers')
-rw-r--r-- | test/Headers/Inputs/usr/include/math.h | 1 | ||||
-rw-r--r-- | test/Headers/Inputs/usr/include/tgmath.h | 4 | ||||
-rw-r--r-- | test/Headers/tgmath-darwin.c | 12 |
3 files changed, 17 insertions, 0 deletions
diff --git a/test/Headers/Inputs/usr/include/math.h b/test/Headers/Inputs/usr/include/math.h new file mode 100644 index 0000000000..4171d4febc --- /dev/null +++ b/test/Headers/Inputs/usr/include/math.h @@ -0,0 +1 @@ +// math.h diff --git a/test/Headers/Inputs/usr/include/tgmath.h b/test/Headers/Inputs/usr/include/tgmath.h new file mode 100644 index 0000000000..897962d9e1 --- /dev/null +++ b/test/Headers/Inputs/usr/include/tgmath.h @@ -0,0 +1,4 @@ +#ifndef SYS_TGMATH_H +#define SYS_TGMATH_H + +#endif /* SYS_TGMATH_H */ diff --git a/test/Headers/tgmath-darwin.c b/test/Headers/tgmath-darwin.c new file mode 100644 index 0000000000..916605a718 --- /dev/null +++ b/test/Headers/tgmath-darwin.c @@ -0,0 +1,12 @@ +// REQUIRES: system-darwin +// RUN: %clang -target x86_64-apple-darwin10 -fsyntax-only -std=c11 -isysroot %S/Inputs %s +#include <tgmath.h> + +// Test the #include_next of tgmath.h works on Darwin. +#ifndef SYS_TGMATH_H + #error "SYS_TGMATH_H not defined" +#endif + +#ifndef __CLANG_TGMATH_H + #error "__CLANG_TGMATH_H not defined" +#endif |