Patchwork VEC re-write [patch 16/25]

login
register
mail settings
Submitter Diego Novillo
Date Nov. 15, 2012, 9:54 p.m.
Message ID <20121115215406.140CAC0916@torture.tor.corp.google.com>
Download mbox | patch
Permalink /patch/199431/
State New
Headers show

Comments

Diego Novillo - Nov. 15, 2012, 9:54 p.m.
2012-11-15  Diego Novillo  <dnovillo@google.com>

	Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)

	* config/ia64/ia64.c: Use new vec API in vec.h.

Patch

diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 66f85de..9a7528f 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -5937,21 +5937,22 @@  ia64_option_override (void)
 {
   unsigned int i;
   cl_deferred_option *opt;
-  VEC(cl_deferred_option,heap) *vec
-    = (VEC(cl_deferred_option,heap) *) ia64_deferred_options;
+  vec<cl_deferred_option> *v
+    = (vec<cl_deferred_option> *) ia64_deferred_options;
 
-  FOR_EACH_VEC_ELT (cl_deferred_option, vec, i, opt)
-    {
-      switch (opt->opt_index)
-	{
-	case OPT_mfixed_range_:
-	  fix_range (opt->arg);
-	  break;
+  if (v)
+    FOR_EACH_VEC_ELT (*v, i, opt)
+      {
+	switch (opt->opt_index)
+	  {
+	  case OPT_mfixed_range_:
+	    fix_range (opt->arg);
+	    break;
 
-	default:
-	  gcc_unreachable ();
-	}
-    }
+	  default:
+	    gcc_unreachable ();
+	  }
+      }
 
   if (TARGET_AUTO_PIC)
     target_flags |= MASK_CONST_GP;