]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PATCH 2/2] (header usage fix) include c++ headers in system.h
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 22 Apr 2016 11:00:42 +0000 (11:00 +0000)
committerSzabolcs Nagy <nsz@gcc.gnu.org>
Fri, 22 Apr 2016 11:00:42 +0000 (11:00 +0000)
2016-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>

* system.h (list, map, set, vector): Include conditionally.
* auto-profile.c (INCLUDE_MAP, INCLUDE_SET): Define.
* graphite-isl-ast-to-gimple.c (INCLUDE_MAP): Define.
* ipa-icf.c (INCLUDE_LIST): Define.
* config/aarch64/cortex-a57-fma-steering.c (INCLUDE_LIST): Define.
* config/sh/sh.c (INCLUDE_VECTOR): Define.
* config/sh/sh_treg_combine.cc (INCLUDE_ALGORITHM): Define.
(INCLUDE_LIST, INCLUDE_VECTOR): Define.
* cp/logic.cc (INCLUDE_LIST): Define.
* fortran/trans-common.c (INCLUDE_MAP): Define.

From-SVN: r235362

gcc/ChangeLog
gcc/auto-profile.c
gcc/config/aarch64/cortex-a57-fma-steering.c
gcc/config/sh/sh.c
gcc/config/sh/sh_treg_combine.cc
gcc/cp/logic.cc
gcc/fortran/trans-common.c
gcc/graphite-isl-ast-to-gimple.c
gcc/ipa-icf.c
gcc/system.h

index 5fb73ce59a88b91e7c1edbb52bb4b05091ae2c1f..ff68ee80b484b7505911bdfdb920732dc8465470 100644 (file)
@@ -1,3 +1,16 @@
+2016-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+       * system.h (list, map, set, vector): Include conditionally.
+       * auto-profile.c (INCLUDE_MAP, INCLUDE_SET): Define.
+       * graphite-isl-ast-to-gimple.c (INCLUDE_MAP): Define.
+       * ipa-icf.c (INCLUDE_LIST): Define.
+       * config/aarch64/cortex-a57-fma-steering.c (INCLUDE_LIST): Define.
+       * config/sh/sh.c (INCLUDE_VECTOR): Define.
+       * config/sh/sh_treg_combine.cc (INCLUDE_ALGORITHM): Define.
+       (INCLUDE_LIST, INCLUDE_VECTOR): Define.
+       * cp/logic.cc (INCLUDE_LIST): Define.
+       * fortran/trans-common.c (INCLUDE_MAP): Define.
+
 2016-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>
 
        * auto-profile.c: Remove <string.h> include.
index 0c726bd4d63fa90c5aa2777fbd2433cd54a4714b..cd82ab4932daccb77c943bccd429d74448c4db8a 100644 (file)
@@ -19,6 +19,8 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
+#define INCLUDE_MAP
+#define INCLUDE_SET
 #include "system.h"
 #include "coretypes.h"
 #include "backend.h"
@@ -31,10 +33,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 #include "gcov-io.h"
 #include "diagnostic-core.h"
-
-#include <map>
-#include <set>
-
 #include "profile.h"
 #include "langhooks.h"
 #include "cfgloop.h"
index 21159fe2ca6f5a6aaae23277a0a45e0fe6e91a9a..1bf804b4873c6b32e0eb3d640a74c2e52843e796 100644 (file)
@@ -19,6 +19,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
+#define INCLUDE_LIST
 #include "system.h"
 #include "coretypes.h"
 #include "backend.h"
@@ -37,8 +38,6 @@
 #include "cortex-a57-fma-steering.h"
 #include "aarch64-protos.h"
 
-#include <list>
-
 /* For better performance, the destination of FMADD/FMSUB instructions should
    have the same parity as their accumulator register if the accumulator
    contains the result of a previous FMUL or FMADD/FMSUB instruction if
index 8c8fe3c671564337a7c23da2aa81f5e400253ddd..b18e59b14184174e7c8c9cbddb523d2f88dd9f24 100644 (file)
@@ -20,9 +20,9 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #include <sstream>
-#include <vector>
 
 #include "config.h"
+#define INCLUDE_VECTOR
 #include "system.h"
 #include "coretypes.h"
 #include "backend.h"
index bc1ee0e234e95735f788fe0710b312c9ebd06814..4d40715db7987d38b48fc40bdee2ed7f830e969d 100644 (file)
@@ -19,6 +19,9 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
+#define INCLUDE_ALGORITHM
+#define INCLUDE_LIST
+#define INCLUDE_VECTOR
 #include "system.h"
 #include "coretypes.h"
 #include "backend.h"
@@ -32,10 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pass.h"
 #include "expr.h"
 
-#include <algorithm>
-#include <list>
-#include <vector>
-
 /*
 This pass tries to optimize for example this:
        mov.l   @(4,r4),r1
index e4967bbfa299151fd02880340866d54b4923909b..c12c381d85c01ae01300526509cf892707bd6156 100644 (file)
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
+#define INCLUDE_LIST
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
@@ -45,8 +46,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "toplev.h"
 #include "type-utils.h"
 
-#include <list>
-
 namespace {
 
 // Helper algorithms
index 44787aebfdecb144234c4e2f8baa36b245b5947e..4fdccc9074717a4afba8feb153d7bbf969ccd48f 100644 (file)
@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3.  If not see
    block for each merged equivalence list.  */
 
 #include "config.h"
+#define INCLUDE_MAP
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
@@ -100,9 +101,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "gfortran.h"
 #include "trans.h"
 #include "stringpool.h"
-
-#include <map>
-
 #include "fold-const.h"
 #include "stor-layout.h"
 #include "varasm.h"
index 88609c08de95736bfa0e47b4847d22165023661c..049a4c5ed3fa81c0951d6e2115b50b46f30f0010 100644 (file)
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #ifdef HAVE_isl
 
+#define INCLUDE_MAP
 #include "system.h"
 #include "coretypes.h"
 #include "backend.h"
@@ -54,7 +55,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfganal.h"
 #include "value-prof.h"
 #include "graphite.h"
-#include <map>
 
 /* We always try to use signed 128 bit types, but fall back to smaller types
    in case a platform does not provide types of these sizes. In the future we
index aa6589c16e1ae284914e6a7a61ab6cd14b406bd4..dda5cacc993070becfc869c9ce7cf3d829fa50df 100644 (file)
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3.  If not see
 */
 
 #include "config.h"
+#define INCLUDE_LIST
 #include "system.h"
 #include "coretypes.h"
 #include "backend.h"
@@ -66,7 +67,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "coverage.h"
 #include "gimple-pretty-print.h"
 #include "data-streamer.h"
-#include <list>
 #include "fold-const.h"
 #include "calls.h"
 #include "varasm.h"
index cb545410a15899ed4f5ebf1919f90ebdb415b36a..984f302fbc953ef41012c496a131c5029a5340b3 100644 (file)
@@ -220,6 +220,18 @@ extern int errno;
 #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
 # include <algorithm>
 #endif
+#ifdef INCLUDE_LIST
+# include <list>
+#endif
+#ifdef INCLUDE_MAP
+# include <map>
+#endif
+#ifdef INCLUDE_SET
+# include <set>
+#endif
+#ifdef INCLUDE_VECTOR
+# include <vector>
+#endif
 # include <cstring>
 # include <new>
 # include <utility>