diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2013-11-22 05:45:37 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2013-11-22 05:45:37 +0000 |
commit | ef062b13d7ea5c4afe434a90436ce1908ac14442 (patch) | |
tree | 15430a70b98350e546a27451e278ea2bc1aec992 /gcc/omp-low.c | |
parent | d41d612242e589882364ba581c586094599952e3 (diff) | |
download | gcc-ef062b13d7ea5c4afe434a90436ce1908ac14442.zip gcc-ef062b13d7ea5c4afe434a90436ce1908ac14442.tar.gz gcc-ef062b13d7ea5c4afe434a90436ce1908ac14442.tar.bz2 |
add auto_vec
2013-11-22 Trevor Saunders <tsaunders@mozilla.com>
gcc/
* vec.h (auto_vec): New class.
* cfganal.c, cfgloop.c, cgraphunit.c, config/i386/i386.c, dwarf2out.c,
function.c, genautomata.c, gimple.c, haifa-sched.c, ipa-inline.c,
ira-build.c, loop-unroll.c, omp-low.c, ree.c, trans-mem.c,
tree-call-cdce.c, tree-eh.c, tree-if-conv.c, tree-into-ssa.c,
tree-loop-distribution.c, tree-predcom.c, tree-sra.c,
tree-sssa-forwprop.c, tree-ssa-loop-manip.c, tree-ssa-pre.c,
tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-structalias.c,
tree-vect-loop.c, tree-vect-stmts.c: Use auto_vec and stack_vec as
appropriate instead of vec for local variables.
cp/
* parser.c, semantics.c: Change some local variables from vec to
auto_vec or stack_vec.
From-SVN: r205244
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 6722155..2995060 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -6901,7 +6901,6 @@ static void expand_omp_sections (struct omp_region *region) { tree t, u, vin = NULL, vmain, vnext, l2; - vec<tree> label_vec; unsigned len; basic_block entry_bb, l0_bb, l1_bb, l2_bb, default_bb; gimple_stmt_iterator si, switch_si; @@ -6954,7 +6953,7 @@ expand_omp_sections (struct omp_region *region) /* Use vec::quick_push on label_vec throughout, since we know the size in advance. */ - label_vec.create (len); + auto_vec<tree> label_vec (len); /* The call to GOMP_sections_start goes in ENTRY_BB, replacing the GIMPLE_OMP_SECTIONS statement. */ @@ -7050,7 +7049,6 @@ expand_omp_sections (struct omp_region *region) stmt = gimple_build_switch (vmain, u, label_vec); gsi_insert_after (&switch_si, stmt, GSI_SAME_STMT); gsi_remove (&switch_si, true); - label_vec.release (); si = gsi_start_bb (default_bb); stmt = gimple_build_call (builtin_decl_explicit (BUILT_IN_TRAP), 0); |