summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-10-09 00:26:50 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-10-09 00:26:50 +0000
commit2999ea0f041659f6ec0cee0fa6ab119c382bfac2 (patch)
tree0253e6b1332632104fbe64e1f5a663ec8d34aa9b
parent18677d51e04af0b4a11212047dbbeefdd0231869 (diff)
downloadbcm5719-llvm-2999ea0f041659f6ec0cee0fa6ab119c382bfac2.tar.gz
bcm5719-llvm-2999ea0f041659f6ec0cee0fa6ab119c382bfac2.zip
PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths.
llvm-svn: 249788
-rw-r--r--libcxx/include/complex.h10
-rw-r--r--libcxx/include/cstddef7
-rw-r--r--libcxx/include/ctype.h3
-rw-r--r--libcxx/include/errno.h3
-rw-r--r--libcxx/include/float.h3
-rw-r--r--libcxx/include/inttypes.h3
-rw-r--r--libcxx/include/math.h3
-rw-r--r--libcxx/include/setjmp.h3
-rw-r--r--libcxx/include/stddef.h8
9 files changed, 29 insertions, 14 deletions
diff --git a/libcxx/include/complex.h b/libcxx/include/complex.h
index 7003d31a89c..c2359665add 100644
--- a/libcxx/include/complex.h
+++ b/libcxx/include/complex.h
@@ -18,6 +18,12 @@
*/
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
#include <ccomplex>
@@ -28,8 +34,4 @@
#endif // __cplusplus
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#pragma GCC system_header
-#endif
-
#endif // _LIBCPP_COMPLEX_H
diff --git a/libcxx/include/cstddef b/libcxx/include/cstddef
index 1210b91987d..edd106c001b 100644
--- a/libcxx/include/cstddef
+++ b/libcxx/include/cstddef
@@ -34,14 +34,15 @@ Types:
*/
#include <__config>
-// Don't include our own <stddef.h>; we don't want to declare ::nullptr_t.
-#include_next <stddef.h>
-#include <__nullptr>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+// Don't include our own <stddef.h>; we don't want to declare ::nullptr_t.
+#include_next <stddef.h>
+#include <__nullptr>
+
_LIBCPP_BEGIN_NAMESPACE_STD
using ::ptrdiff_t;
diff --git a/libcxx/include/ctype.h b/libcxx/include/ctype.h
index 63f0b296077..22d6c49be9e 100644
--- a/libcxx/include/ctype.h
+++ b/libcxx/include/ctype.h
@@ -31,12 +31,13 @@ int toupper(int c);
*/
#include <__config>
-#include_next <ctype.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <ctype.h>
+
#ifdef __cplusplus
#if defined(_LIBCPP_MSVCRT)
diff --git a/libcxx/include/errno.h b/libcxx/include/errno.h
index 3cda2aff7b3..556ef6112ec 100644
--- a/libcxx/include/errno.h
+++ b/libcxx/include/errno.h
@@ -24,12 +24,13 @@ Macros:
*/
#include <__config>
-#include_next <errno.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <errno.h>
+
#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
#ifdef ELAST
diff --git a/libcxx/include/float.h b/libcxx/include/float.h
index 275388e3f40..f890c680851 100644
--- a/libcxx/include/float.h
+++ b/libcxx/include/float.h
@@ -61,12 +61,13 @@ Macros:
*/
#include <__config>
-#include_next <float.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <float.h>
+
#ifndef FLT_EVAL_METHOD
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
#endif
diff --git a/libcxx/include/inttypes.h b/libcxx/include/inttypes.h
index a20a5619133..328e57e5e4e 100644
--- a/libcxx/include/inttypes.h
+++ b/libcxx/include/inttypes.h
@@ -232,12 +232,13 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
*/
#include <__config>
-#include_next <inttypes.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <inttypes.h>
+
#ifdef __cplusplus
#include <stdint.h>
diff --git a/libcxx/include/math.h b/libcxx/include/math.h
index dc056220438..20205544d51 100644
--- a/libcxx/include/math.h
+++ b/libcxx/include/math.h
@@ -293,12 +293,13 @@ long double truncl(long double x);
*/
#include <__config>
-#include_next <math.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <math.h>
+
#ifdef __cplusplus
// We support including .h headers inside 'extern "C"' contexts, so switch
diff --git a/libcxx/include/setjmp.h b/libcxx/include/setjmp.h
index d429c8624f2..ec4a5f695f3 100644
--- a/libcxx/include/setjmp.h
+++ b/libcxx/include/setjmp.h
@@ -27,12 +27,13 @@ void longjmp(jmp_buf env, int val);
*/
#include <__config>
-#include_next <setjmp.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <setjmp.h>
+
#ifndef setjmp
#define setjmp(env) setjmp(env)
#endif
diff --git a/libcxx/include/stddef.h b/libcxx/include/stddef.h
index 6ffe582518f..8841bbea297 100644
--- a/libcxx/include/stddef.h
+++ b/libcxx/include/stddef.h
@@ -10,6 +10,11 @@
#if defined(__need_ptrdiff_t) || defined(__need_size_t) || \
defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
+
#include_next <stddef.h>
#elif !defined(_LIBCPP_STDDEF_H)
@@ -33,12 +38,13 @@ Types:
*/
#include <__config>
-#include_next <stddef.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <stddef.h>
+
#ifdef __cplusplus
extern "C++" {
OpenPOWER on IntegriCloud