From 5095da95bda21b0f8e6f8ebeb79618af1f9dab23 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Mon, 11 Oct 2010 15:08:28 +0000 Subject: vec.h (VEC_qsort): Define. gcc/ * vec.h (VEC_qsort): Define. * dbxout.c (output_used_types): Use it. * df-scan.c (df_sort_and_compress_refs): Likewise. (df_sort_and_compress_mws): Likewise. * genautomata.c (uniq_sort_alt_states): Likewise. (evaluate_equiv_classes): Likewise. (output_trans_table): Likewise. (output_state): Likewise. * gimplify.c (compare_case_labels): Likewise. * graphite-sese-to-poly.c (graphite_sort_dominated_info): Likewise. * ipa.c (build_cdtor_fns): Likewise. * lto.c (lto_wpa_write_files): Likewise. * sel-sched.c (fill_vec_av_set): Likewise. * tree-predcom.c (determine_roots_comp): Likewise. * tree-sra.c (sort_and_spliace_var_accesses): Likewise. (splice_param_accesses): Likewise. * tree-ssa-live.c (dump_enumerated_decls): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. (reassociate_bb): Likewise. * tree-ssa-sccvn.c (sort_scc): Likewise. * tree-ssa-structalias.c (sort_fieldstack): Likewise. gcc/ada/ * gcc-interface/utils2.c (gnat_build_constructor): Use VEC_qsort. From-SVN: r165314 --- gcc/ipa.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'gcc/ipa.c') diff --git a/gcc/ipa.c b/gcc/ipa.c index 0b1e2c9..dcf1e9a 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -1557,20 +1557,14 @@ build_cdtor_fns (void) if (!VEC_empty (tree, static_ctors)) { gcc_assert (!targetm.have_ctors_dtors || in_lto_p); - qsort (VEC_address (tree, static_ctors), - VEC_length (tree, static_ctors), - sizeof (tree), - compare_ctor); + VEC_qsort (tree, static_ctors, compare_ctor); build_cdtor (/*ctor_p=*/true, static_ctors); } if (!VEC_empty (tree, static_dtors)) { gcc_assert (!targetm.have_ctors_dtors || in_lto_p); - qsort (VEC_address (tree, static_dtors), - VEC_length (tree, static_dtors), - sizeof (tree), - compare_dtor); + VEC_qsort (tree, static_dtors, compare_dtor); build_cdtor (/*ctor_p=*/false, static_dtors); } } -- cgit v1.1