diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-08-20 12:48:59 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-08-20 12:48:59 +0000 |
commit | ac47786e993ddb3c50545230d13f57df891c0562 (patch) | |
tree | 7983da0de4d80a3a7b43caa30ccd5dc36d8bf25e /gcc/cp/name-lookup.c | |
parent | 8f0fe813790d58066714c8f38f4916925c83517d (diff) | |
download | gcc-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/cp/name-lookup.c')
-rw-r--r-- | gcc/cp/name-lookup.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 800e340..af6cef4 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -327,9 +327,7 @@ new_class_binding (tree name, tree value, tree type, cxx_scope *scope) /* Fixup the current bindings, as they might have moved. */ size_t i; - for (i = 0; - VEC_iterate (cp_class_binding, scope->class_shadowed, i, cb); - i++) + FOR_EACH_VEC_ELT (cp_class_binding, scope->class_shadowed, i, cb) { cxx_binding **b; b = &IDENTIFIER_BINDING (cb->identifier); @@ -1687,9 +1685,7 @@ print_binding_level (struct cp_binding_level* lvl) size_t i; cp_class_binding *b; fprintf (stderr, " class-shadowed:"); - for (i = 0; - VEC_iterate(cp_class_binding, lvl->class_shadowed, i, b); - ++i) + FOR_EACH_VEC_ELT (cp_class_binding, lvl->class_shadowed, i, b) fprintf (stderr, " %s ", IDENTIFIER_POINTER (b->identifier)); fprintf (stderr, "\n"); } @@ -2644,9 +2640,7 @@ poplevel_class (void) /* Remove the bindings for all of the class-level declarations. */ if (level->class_shadowed) { - for (i = 0; - VEC_iterate (cp_class_binding, level->class_shadowed, i, cb); - ++i) + FOR_EACH_VEC_ELT (cp_class_binding, level->class_shadowed, i, cb) IDENTIFIER_BINDING (cb->identifier) = cb->base.previous; ggc_free (level->class_shadowed); level->class_shadowed = NULL; @@ -4048,7 +4042,7 @@ tree_vec_contains (VEC(tree,gc)* vec, tree target) { unsigned int i; tree elt; - for (i = 0; VEC_iterate(tree,vec,i,elt); ++i) + FOR_EACH_VEC_ELT (tree,vec,i,elt) if (elt == target) return true; return false; @@ -5001,7 +4995,7 @@ arg_assoc_args_vec (struct arg_lookup *k, VEC(tree,gc) *args) unsigned int ix; tree arg; - for (ix = 0; VEC_iterate (tree, args, ix, arg); ++ix) + FOR_EACH_VEC_ELT (tree, args, ix, arg) if (arg_assoc (k, arg)) return true; return false; @@ -5484,7 +5478,7 @@ push_to_top_level (void) SET_IDENTIFIER_TYPE_VALUE (TREE_PURPOSE (t), TREE_VALUE (t)); } - for (i = 0; VEC_iterate (cxx_saved_binding, s->old_bindings, i, sb); ++i) + FOR_EACH_VEC_ELT (cxx_saved_binding, s->old_bindings, i, sb) IDENTIFIER_MARKED (sb->identifier) = 0; s->prev = scope_chain; @@ -5521,7 +5515,7 @@ pop_from_top_level (void) current_lang_base = 0; scope_chain = s->prev; - for (i = 0; VEC_iterate (cxx_saved_binding, s->old_bindings, i, saved); ++i) + FOR_EACH_VEC_ELT (cxx_saved_binding, s->old_bindings, i, saved) { tree id = saved->identifier; |