aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-08-20 12:48:59 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-08-20 12:48:59 +0000
commitac47786e993ddb3c50545230d13f57df891c0562 (patch)
tree7983da0de4d80a3a7b43caa30ccd5dc36d8bf25e /gcc/lto-streamer-out.c
parent8f0fe813790d58066714c8f38f4916925c83517d (diff)
downloadgcc-ac47786e993ddb3c50545230d13f57df891c0562.zip
gcc-ac47786e993ddb3c50545230d13f57df891c0562.tar.gz
gcc-ac47786e993ddb3c50545230d13f57df891c0562.tar.bz2
vec.h (FOR_EACH_VEC_ELT): Define.
gcc/ * vec.h (FOR_EACH_VEC_ELT): Define. * c-decl.c: Use it. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/bfin/bfin.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * dbxout.c: Likewise. * df-scan.c: Likewise. * dominance.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * ggc-common.c: Likewise. * gimplify.c: Likewise. * graphite-blocking.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * ipa-prop.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-emit.c: Likewise. * lambda-code.c: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-opts.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-symtab.c: Likewise. * matrix-reorg.c: Likewise. * opts.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-data-ref.c: Likewise. * tree-emutls.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Use FOR_EACH_VEC_ELT. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. gcc/c-family/ * c-common.c: Use FOR_EACH_VEC_ELT. * c-gimplify.c: Likewise. * c-pragma.c: Likewise. gcc/cp/ * call.c: Use FOR_EACH_VEC_ELT. * class.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * error.c: Likewise. * except.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * repo.c: Likewise. * semantics.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * trans-openmp.c: Use FOR_EACH_VEC_ELT. gcc/java/ * class.c: Use FOR_EACH_VEC_ELT. * expr.c: Likewise. * jcf-parse.c: Likewise. * resource.c: Likewise. gcc/lto/ * lto.c: Use FOR_EACH_VEC_ELT. From-SVN: r163401
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 562e934..e00fd86 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -1042,7 +1042,7 @@ lto_output_ts_block_tree_pointers (struct output_block *ob, tree expr,
lto_output_chain (ob, BLOCK_VARS (expr), ref_p);
output_uleb128 (ob, VEC_length (tree, BLOCK_NONLOCALIZED_VARS (expr)));
- for (i = 0; VEC_iterate (tree, BLOCK_NONLOCALIZED_VARS (expr), i, t); i++)
+ FOR_EACH_VEC_ELT (tree, BLOCK_NONLOCALIZED_VARS (expr), i, t)
lto_output_tree_or_ref (ob, t, ref_p);
lto_output_tree_or_ref (ob, BLOCK_SUPERCONTEXT (expr), ref_p);
@@ -1067,7 +1067,7 @@ lto_output_ts_binfo_tree_pointers (struct output_block *ob, tree expr,
/* Note that the number of BINFO slots has already been emitted in
EXPR's header (see lto_output_tree_header) because this length
is needed to build the empty BINFO node on the reader side. */
- for (i = 0; VEC_iterate (tree, BINFO_BASE_BINFOS (expr), i, t); i++)
+ FOR_EACH_VEC_ELT (tree, BINFO_BASE_BINFOS (expr), i, t)
lto_output_tree_or_ref (ob, t, ref_p);
output_zero (ob);
@@ -1077,7 +1077,7 @@ lto_output_ts_binfo_tree_pointers (struct output_block *ob, tree expr,
lto_output_tree_or_ref (ob, BINFO_VPTR_FIELD (expr), ref_p);
output_uleb128 (ob, VEC_length (tree, BINFO_BASE_ACCESSES (expr)));
- for (i = 0; VEC_iterate (tree, BINFO_BASE_ACCESSES (expr), i, t); i++)
+ FOR_EACH_VEC_ELT (tree, BINFO_BASE_ACCESSES (expr), i, t)
lto_output_tree_or_ref (ob, t, ref_p);
lto_output_tree_or_ref (ob, BINFO_INHERITANCE_CHAIN (expr), ref_p);
@@ -1508,17 +1508,17 @@ output_eh_regions (struct output_block *ob, struct function *fn)
/* Emit all the EH regions in the region array. */
output_sleb128 (ob, VEC_length (eh_region, fn->eh->region_array));
- for (i = 0; VEC_iterate (eh_region, fn->eh->region_array, i, eh); i++)
+ FOR_EACH_VEC_ELT (eh_region, fn->eh->region_array, i, eh)
output_eh_region (ob, eh);
/* Emit all landing pads. */
output_sleb128 (ob, VEC_length (eh_landing_pad, fn->eh->lp_array));
- for (i = 0; VEC_iterate (eh_landing_pad, fn->eh->lp_array, i, lp); i++)
+ FOR_EACH_VEC_ELT (eh_landing_pad, fn->eh->lp_array, i, lp)
output_eh_lp (ob, lp);
/* Emit all the runtime type data. */
output_sleb128 (ob, VEC_length (tree, fn->eh->ttype_data));
- for (i = 0; VEC_iterate (tree, fn->eh->ttype_data, i, ttype); i++)
+ FOR_EACH_VEC_ELT (tree, fn->eh->ttype_data, i, ttype)
lto_output_tree_ref (ob, ttype);
/* Emit the table of action chains. */
@@ -1526,16 +1526,14 @@ output_eh_regions (struct output_block *ob, struct function *fn)
{
tree t;
output_sleb128 (ob, VEC_length (tree, fn->eh->ehspec_data.arm_eabi));
- for (i = 0;
- VEC_iterate (tree, fn->eh->ehspec_data.arm_eabi, i, t);
- i++)
+ FOR_EACH_VEC_ELT (tree, fn->eh->ehspec_data.arm_eabi, i, t)
lto_output_tree_ref (ob, t);
}
else
{
uchar c;
output_sleb128 (ob, VEC_length (uchar, fn->eh->ehspec_data.other));
- for (i = 0; VEC_iterate (uchar, fn->eh->ehspec_data.other, i, c); i++)
+ FOR_EACH_VEC_ELT (uchar, fn->eh->ehspec_data.other, i, c)
lto_output_1_stream (ob->main_stream, c);
}
}
@@ -1908,7 +1906,7 @@ output_function (struct cgraph_node *node)
/* Output all the local variables in the function. */
output_sleb128 (ob, VEC_length (tree, fn->local_decls));
- for (i = 0; VEC_iterate (tree, fn->local_decls, i, t); i++)
+ FOR_EACH_VEC_ELT (tree, fn->local_decls, i, t)
lto_output_tree_ref (ob, t);
/* Output the head of the arguments list. */
@@ -2013,7 +2011,7 @@ output_unreferenced_globals (cgraph_node_set set, varpool_node_set vset)
output_zero (ob);
/* Emit the alias pairs for the nodes in SET. */
- for (i = 0; VEC_iterate (alias_pair, alias_pairs, i, p); i++)
+ FOR_EACH_VEC_ELT (alias_pair, alias_pairs, i, p)
{
if (output_alias_pair_p (p, set, vset))
{
@@ -2446,7 +2444,7 @@ produce_symtab (struct output_block *ob,
}
/* Write all aliases. */
- for (i = 0; VEC_iterate (alias_pair, alias_pairs, i, p); i++)
+ FOR_EACH_VEC_ELT (alias_pair, alias_pairs, i, p)
if (output_alias_pair_p (p, set, vset))
write_symbol (cache, &stream, p->decl, seen, true);