Commit 2c384ad8 by Szabolcs Nagy Committed by Szabolcs Nagy

[PATCH 2/2] (header usage fix) include c++ headers in system.h

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
parent e4ccecd5
2016-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com> 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. * auto-profile.c: Remove <string.h> include.
* ipa-icf-gimple.c: Remove <list> include. * ipa-icf-gimple.c: Remove <list> include.
* diagnostic.c: Remove <new> include. * diagnostic.c: Remove <new> include.
......
...@@ -19,6 +19,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -19,6 +19,8 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include "config.h" #include "config.h"
#define INCLUDE_MAP
#define INCLUDE_SET
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "backend.h" #include "backend.h"
...@@ -31,10 +33,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -31,10 +33,6 @@ along with GCC; see the file COPYING3. If not see
#include "cgraph.h" #include "cgraph.h"
#include "gcov-io.h" #include "gcov-io.h"
#include "diagnostic-core.h" #include "diagnostic-core.h"
#include <map>
#include <set>
#include "profile.h" #include "profile.h"
#include "langhooks.h" #include "langhooks.h"
#include "cfgloop.h" #include "cfgloop.h"
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include "config.h" #include "config.h"
#define INCLUDE_LIST
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "backend.h" #include "backend.h"
...@@ -37,8 +38,6 @@ ...@@ -37,8 +38,6 @@
#include "cortex-a57-fma-steering.h" #include "cortex-a57-fma-steering.h"
#include "aarch64-protos.h" #include "aarch64-protos.h"
#include <list>
/* For better performance, the destination of FMADD/FMSUB instructions should /* For better performance, the destination of FMADD/FMSUB instructions should
have the same parity as their accumulator register if the accumulator have the same parity as their accumulator register if the accumulator
contains the result of a previous FMUL or FMADD/FMSUB instruction if contains the result of a previous FMUL or FMADD/FMSUB instruction if
......
...@@ -20,9 +20,9 @@ along with GCC; see the file COPYING3. If not see ...@@ -20,9 +20,9 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <sstream> #include <sstream>
#include <vector>
#include "config.h" #include "config.h"
#define INCLUDE_VECTOR
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "backend.h" #include "backend.h"
......
...@@ -19,6 +19,9 @@ along with GCC; see the file COPYING3. If not see ...@@ -19,6 +19,9 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include "config.h" #include "config.h"
#define INCLUDE_ALGORITHM
#define INCLUDE_LIST
#define INCLUDE_VECTOR
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "backend.h" #include "backend.h"
...@@ -32,10 +35,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -32,10 +35,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h" #include "tree-pass.h"
#include "expr.h" #include "expr.h"
#include <algorithm>
#include <list>
#include <vector>
/* /*
This pass tries to optimize for example this: This pass tries to optimize for example this:
mov.l @(4,r4),r1 mov.l @(4,r4),r1
......
...@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include "config.h" #include "config.h"
#define INCLUDE_LIST
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "tm.h" #include "tm.h"
...@@ -45,8 +46,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -45,8 +46,6 @@ along with GCC; see the file COPYING3. If not see
#include "toplev.h" #include "toplev.h"
#include "type-utils.h" #include "type-utils.h"
#include <list>
namespace { namespace {
// Helper algorithms // Helper algorithms
......
...@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3. If not see
block for each merged equivalence list. */ block for each merged equivalence list. */
#include "config.h" #include "config.h"
#define INCLUDE_MAP
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "tm.h" #include "tm.h"
...@@ -100,9 +101,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -100,9 +101,6 @@ along with GCC; see the file COPYING3. If not see
#include "gfortran.h" #include "gfortran.h"
#include "trans.h" #include "trans.h"
#include "stringpool.h" #include "stringpool.h"
#include <map>
#include "fold-const.h" #include "fold-const.h"
#include "stor-layout.h" #include "stor-layout.h"
#include "varasm.h" #include "varasm.h"
......
...@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#ifdef HAVE_isl #ifdef HAVE_isl
#define INCLUDE_MAP
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "backend.h" #include "backend.h"
...@@ -54,7 +55,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -54,7 +55,6 @@ along with GCC; see the file COPYING3. If not see
#include "cfganal.h" #include "cfganal.h"
#include "value-prof.h" #include "value-prof.h"
#include "graphite.h" #include "graphite.h"
#include <map>
/* We always try to use signed 128 bit types, but fall back to smaller types /* 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 in case a platform does not provide types of these sizes. In the future we
......
...@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see
*/ */
#include "config.h" #include "config.h"
#define INCLUDE_LIST
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "backend.h" #include "backend.h"
...@@ -66,7 +67,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -66,7 +67,6 @@ along with GCC; see the file COPYING3. If not see
#include "coverage.h" #include "coverage.h"
#include "gimple-pretty-print.h" #include "gimple-pretty-print.h"
#include "data-streamer.h" #include "data-streamer.h"
#include <list>
#include "fold-const.h" #include "fold-const.h"
#include "calls.h" #include "calls.h"
#include "varasm.h" #include "varasm.h"
......
...@@ -220,6 +220,18 @@ extern int errno; ...@@ -220,6 +220,18 @@ extern int errno;
#if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY) #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
# include <algorithm> # include <algorithm>
#endif #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 <cstring>
# include <new> # include <new>
# include <utility> # include <utility>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment