]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
system.h: Include algorithm and utility.
authorUros Bizjak <ubizjak@gmail.com>
Tue, 11 Nov 2014 13:12:39 +0000 (14:12 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 11 Nov 2014 13:12:39 +0000 (14:12 +0100)
* system.h: Include algorithm and utility.
* rtl.h: Do not include utility here.
* wide-int.h: Ditto.
* tree-vect-data-refs.c (swap): Remove template.
(vect_prune_runtime_alias_test_list): Use std::swap instead of swap.

From-SVN: r217348

gcc/ChangeLog
gcc/rtl.h
gcc/system.h
gcc/tree-vect-data-refs.c
gcc/wide-int.h

index f86c51baf8cf31e3d8cb03b285872976c3ad67e0..2f6582dc90ee07b550997c7a9b165626337ccfd2 100644 (file)
@@ -1,3 +1,11 @@
+2014-11-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       * system.h: Include algorithm and utility.
+       * rtl.h: Do not include utility here.
+       * wide-int.h: Ditto.
+       * tree-vect-data-refs.c (swap): Remove template.
+       (vect_prune_runtime_alias_test_list): Use std::swap instead of swap.
+
 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        PR bootstrap/63699
index c697d553e95e664239eadb2886770cff15efcea4..fa38abb102edbad3828ca2fe8d861d648aa4bdc3 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -20,7 +20,6 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_RTL_H
 #define GCC_RTL_H
 
-#include <utility>
 #include "statistics.h"
 #include "machmode.h"
 #include "input.h"
index c05f02d627300c97bf87afa1b8e7b627dad1e3dd..58f50f195211e1fa6ab0a5a6dc7f4ccab59c9af5 100644 (file)
@@ -215,7 +215,9 @@ extern int errno;
 #endif
 
 #ifdef __cplusplus
+# include <algorithm>
 # include <cstring>
+# include <utility>
 #endif
 
 /* Some of glibc's string inlines cause warnings.  Plus we'd rather
index 0bc03561cb00f45793ee60d6921bc664f7b3af18..c49b47c7cc4f7caf7bf0976aaf5b581b7d84faca 100644 (file)
@@ -2718,14 +2718,6 @@ comp_dr_with_seg_len_pair (const void *p1_, const void *p2_)
   return 0;
 }
 
-template <class T> static void
-swap (T& a, T& b)
-{
-  T c (a);
-  a = b;
-  b = c;
-}
-
 /* Function vect_vfa_segment_size.
 
    Create an expression that computes the size of segment
@@ -2858,7 +2850,7 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
           dr_with_seg_len (dr_b, segment_length_b));
 
       if (compare_tree (DR_BASE_ADDRESS (dr_a), DR_BASE_ADDRESS (dr_b)) > 0)
-       swap (dr_with_seg_len_pair.first, dr_with_seg_len_pair.second);
+       std::swap (dr_with_seg_len_pair.first, dr_with_seg_len_pair.second);
 
       comp_alias_ddrs.safe_push (dr_with_seg_len_pair);
     }
@@ -2908,8 +2900,8 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
             and DR_A1 and DR_A2 are two consecutive memrefs.  */
          if (*dr_a1 == *dr_a2)
            {
-             swap (dr_a1, dr_b1);
-             swap (dr_a2, dr_b2);
+             std::swap (dr_a1, dr_b1);
+             std::swap (dr_a2, dr_b2);
            }
 
          if (!operand_equal_p (DR_BASE_ADDRESS (dr_a1->dr),
index 00c7d6ec0e4d843b93b2a88b9e34c58f75109006..f5735d8090491ee9f21c86b4d7ac4bba2d790421 100644 (file)
@@ -216,8 +216,6 @@ along with GCC; see the file COPYING3.  If not see
    the same result as X + X; the precision of the shift amount Y
    can be arbitrarily different from X.  */
 
-
-#include <utility>
 #include "system.h"
 #include "hwint.h"
 #include "signop.h"