From: Trevor Saunders Date: Tue, 11 Aug 2015 22:39:37 +0000 (+0000) Subject: replace several uses of the anon namespace with GCC_FINAL X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63ab94b6d5d732161780c68fce775bd23f8e2a99;p=gcc.git replace several uses of the anon namespace with GCC_FINAL gcc/ChangeLog: 2015-08-11 Trevor Saunders * compare-elim.c, dce.c, dse.c, gimple-ssa-isolate-paths.c, gimple-ssa-strength-reduction.c, graphite.c, init-regs.c, ipa-pure-const.c, ipa-visibility.c, ipa.c, mode-switching.c, omp-low.c, reorg.c, sanopt.c, trans-mem.c, tree-eh.c, tree-if-conv.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-sink.c, tree-ssanames.c, tree-stdarg.c, tree-tailcall.c, tree-vect-generic.c, tree.c, ubsan.c, var-tracking.c, vtable-verify.c, web.c: Use GCC_FINAL instead of the anonymous namespace. From-SVN: r226793 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8db5376a13d..063513ba0e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2015-08-11 Trevor Saunders + + * compare-elim.c, dce.c, dse.c, gimple-ssa-isolate-paths.c, + gimple-ssa-strength-reduction.c, graphite.c, init-regs.c, + ipa-pure-const.c, ipa-visibility.c, ipa.c, mode-switching.c, + omp-low.c, reorg.c, sanopt.c, trans-mem.c, tree-eh.c, + tree-if-conv.c, tree-ssa-copyrename.c, tree-ssa-dce.c, + tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, + tree-ssa-sink.c, tree-ssanames.c, tree-stdarg.c, tree-tailcall.c, + tree-vect-generic.c, tree.c, ubsan.c, var-tracking.c, + vtable-verify.c, web.c: Use GCC_FINAL instead of the anonymous + 2015-08-11 Uros Bizjak PR target/66954 diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c index b65d09e7938..ea94c4e2036 100644 --- a/gcc/compare-elim.c +++ b/gcc/compare-elim.c @@ -668,9 +668,7 @@ execute_compare_elim_after_reload (void) return 0; } -namespace { - -const pass_data pass_data_compare_elim_after_reload = +static const pass_data pass_data_compare_elim_after_reload = { RTL_PASS, /* type */ "cmpelim", /* name */ @@ -683,7 +681,7 @@ const pass_data pass_data_compare_elim_after_reload = ( TODO_df_finish | TODO_df_verify ), /* todo_flags_finish */ }; -class pass_compare_elim_after_reload : public rtl_opt_pass +class pass_compare_elim_after_reload GCC_FINAL : public rtl_opt_pass { public: pass_compare_elim_after_reload (gcc::context *ctxt) @@ -706,8 +704,6 @@ public: }; // class pass_compare_elim_after_reload -} // anon namespace - rtl_opt_pass * make_pass_compare_elim_after_reload (gcc::context *ctxt) { diff --git a/gcc/dce.c b/gcc/dce.c index c9cffc97055..1b23eb79ade 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -784,9 +784,7 @@ rest_of_handle_ud_dce (void) } -namespace { - -const pass_data pass_data_ud_rtl_dce = +static const pass_data pass_data_ud_rtl_dce = { RTL_PASS, /* type */ "ud_dce", /* name */ @@ -799,7 +797,7 @@ const pass_data pass_data_ud_rtl_dce = TODO_df_finish, /* todo_flags_finish */ }; -class pass_ud_rtl_dce : public rtl_opt_pass +class pass_ud_rtl_dce GCC_FINAL : public rtl_opt_pass { public: pass_ud_rtl_dce (gcc::context *ctxt) @@ -819,8 +817,6 @@ public: }; // class pass_ud_rtl_dce -} // anon namespace - rtl_opt_pass * make_pass_ud_rtl_dce (gcc::context *ctxt) { @@ -1215,9 +1211,7 @@ run_fast_dce (void) } -namespace { - -const pass_data pass_data_fast_rtl_dce = +static const pass_data pass_data_fast_rtl_dce = { RTL_PASS, /* type */ "rtl_dce", /* name */ @@ -1230,7 +1224,7 @@ const pass_data pass_data_fast_rtl_dce = TODO_df_finish, /* todo_flags_finish */ }; -class pass_fast_rtl_dce : public rtl_opt_pass +class pass_fast_rtl_dce GCC_FINAL : public rtl_opt_pass { public: pass_fast_rtl_dce (gcc::context *ctxt) @@ -1250,8 +1244,6 @@ public: }; // class pass_fast_rtl_dce -} // anon namespace - rtl_opt_pass * make_pass_fast_rtl_dce (gcc::context *ctxt) { diff --git a/gcc/dse.c b/gcc/dse.c index ff26fc0cb05..6a0cc07b61e 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -3725,9 +3725,7 @@ rest_of_handle_dse (void) return 0; } -namespace { - -const pass_data pass_data_rtl_dse1 = +static const pass_data pass_data_rtl_dse1 = { RTL_PASS, /* type */ "dse1", /* name */ @@ -3740,7 +3738,7 @@ const pass_data pass_data_rtl_dse1 = TODO_df_finish, /* todo_flags_finish */ }; -class pass_rtl_dse1 : public rtl_opt_pass +class pass_rtl_dse1 GCC_FINAL : public rtl_opt_pass { public: pass_rtl_dse1 (gcc::context *ctxt) @@ -3757,17 +3755,13 @@ public: }; // class pass_rtl_dse1 -} // anon namespace - rtl_opt_pass * make_pass_rtl_dse1 (gcc::context *ctxt) { return new pass_rtl_dse1 (ctxt); } -namespace { - -const pass_data pass_data_rtl_dse2 = +static const pass_data pass_data_rtl_dse2 = { RTL_PASS, /* type */ "dse2", /* name */ @@ -3780,7 +3774,7 @@ const pass_data pass_data_rtl_dse2 = TODO_df_finish, /* todo_flags_finish */ }; -class pass_rtl_dse2 : public rtl_opt_pass +class pass_rtl_dse2 GCC_FINAL : public rtl_opt_pass { public: pass_rtl_dse2 (gcc::context *ctxt) @@ -3797,8 +3791,6 @@ public: }; // class pass_rtl_dse2 -} // anon namespace - rtl_opt_pass * make_pass_rtl_dse2 (gcc::context *ctxt) { diff --git a/gcc/gimple-ssa-isolate-paths.c b/gcc/gimple-ssa-isolate-paths.c index 6f84f85856b..d68eaff5f7d 100644 --- a/gcc/gimple-ssa-isolate-paths.c +++ b/gcc/gimple-ssa-isolate-paths.c @@ -540,8 +540,7 @@ gimple_ssa_isolate_erroneous_paths (void) return 0; } -namespace { -const pass_data pass_data_isolate_erroneous_paths = +static const pass_data pass_data_isolate_erroneous_paths = { GIMPLE_PASS, /* type */ "isolate-paths", /* name */ @@ -554,7 +553,7 @@ const pass_data pass_data_isolate_erroneous_paths = 0, /* todo_flags_finish */ }; -class pass_isolate_erroneous_paths : public gimple_opt_pass +class pass_isolate_erroneous_paths GCC_FINAL : public gimple_opt_pass { public: pass_isolate_erroneous_paths (gcc::context *ctxt) @@ -578,7 +577,6 @@ public: } }; // class pass_isolate_erroneous_paths -} gimple_opt_pass * make_pass_isolate_erroneous_paths (gcc::context *ctxt) diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index b369ef5ed89..f192f545164 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -3584,9 +3584,7 @@ analyze_candidates_and_replace (void) } } -namespace { - -const pass_data pass_data_strength_reduction = +static const pass_data pass_data_strength_reduction = { GIMPLE_PASS, /* type */ "slsr", /* name */ @@ -3599,7 +3597,7 @@ const pass_data pass_data_strength_reduction = 0, /* todo_flags_finish */ }; -class pass_strength_reduction : public gimple_opt_pass +class pass_strength_reduction GCC_FINAL : public gimple_opt_pass { public: pass_strength_reduction (gcc::context *ctxt) @@ -3665,8 +3663,6 @@ pass_strength_reduction::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_strength_reduction (gcc::context *ctxt) { diff --git a/gcc/graphite.c b/gcc/graphite.c index 9b9ab887287..ca1b9b64b77 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -338,9 +338,7 @@ gate_graphite_transforms (void) return flag_graphite != 0; } -namespace { - -const pass_data pass_data_graphite = +static const pass_data pass_data_graphite = { GIMPLE_PASS, /* type */ "graphite0", /* name */ @@ -353,7 +351,7 @@ const pass_data pass_data_graphite = 0, /* todo_flags_finish */ }; -class pass_graphite : public gimple_opt_pass +class pass_graphite GCC_FINAL : public gimple_opt_pass { public: pass_graphite (gcc::context *ctxt) @@ -365,17 +363,13 @@ public: }; // class pass_graphite -} // anon namespace - gimple_opt_pass * make_pass_graphite (gcc::context *ctxt) { return new pass_graphite (ctxt); } -namespace { - -const pass_data pass_data_graphite_transforms = +static const pass_data pass_data_graphite_transforms = { GIMPLE_PASS, /* type */ "graphite", /* name */ @@ -388,7 +382,7 @@ const pass_data pass_data_graphite_transforms = 0, /* todo_flags_finish */ }; -class pass_graphite_transforms : public gimple_opt_pass +class pass_graphite_transforms GCC_FINAL : public gimple_opt_pass { public: pass_graphite_transforms (gcc::context *ctxt) @@ -401,8 +395,6 @@ public: }; // class pass_graphite_transforms -} // anon namespace - gimple_opt_pass * make_pass_graphite_transforms (gcc::context *ctxt) { diff --git a/gcc/init-regs.c b/gcc/init-regs.c index 68fb7fe5d05..42f1b28603d 100644 --- a/gcc/init-regs.c +++ b/gcc/init-regs.c @@ -137,9 +137,7 @@ initialize_uninitialized_regs (void) BITMAP_FREE (already_genned); } -namespace { - -const pass_data pass_data_initialize_regs = +static const pass_data pass_data_initialize_regs = { RTL_PASS, /* type */ "init-regs", /* name */ @@ -152,7 +150,7 @@ const pass_data pass_data_initialize_regs = TODO_df_finish, /* todo_flags_finish */ }; -class pass_initialize_regs : public rtl_opt_pass +class pass_initialize_regs GCC_FINAL : public rtl_opt_pass { public: pass_initialize_regs (gcc::context *ctxt) @@ -169,8 +167,6 @@ public: }; // class pass_initialize_regs -} // anon namespace - rtl_opt_pass * make_pass_initialize_regs (gcc::context *ctxt) { diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 8fd8c365bb4..f9d5ef94932 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -120,9 +120,7 @@ static vec funct_state_vec; static bool gate_pure_const (void); -namespace { - -const pass_data pass_data_ipa_pure_const = +static const pass_data pass_data_ipa_pure_const = { IPA_PASS, /* type */ "pure-const", /* name */ @@ -135,7 +133,7 @@ const pass_data pass_data_ipa_pure_const = 0, /* todo_flags_finish */ }; -class pass_ipa_pure_const : public ipa_opt_pass_d +class pass_ipa_pure_const GCC_FINAL : public ipa_opt_pass_d { public: pass_ipa_pure_const(gcc::context *ctxt); @@ -156,8 +154,6 @@ private: }; // class pass_ipa_pure_const -} // anon namespace - /* Try to guess if function body will always be visible to compiler when compiling the call and whether compiler will be able to propagate the information by itself. */ @@ -1669,9 +1665,7 @@ skip_function_for_local_pure_const (struct cgraph_node *node) ipa_pure_const. This pass is effective when executed together with other optimization passes in early optimization pass queue. */ -namespace { - -const pass_data pass_data_local_pure_const = +static const pass_data pass_data_local_pure_const = { GIMPLE_PASS, /* type */ "local-pure-const", /* name */ @@ -1684,7 +1678,7 @@ const pass_data pass_data_local_pure_const = 0, /* todo_flags_finish */ }; -class pass_local_pure_const : public gimple_opt_pass +class pass_local_pure_const GCC_FINAL : public gimple_opt_pass { public: pass_local_pure_const (gcc::context *ctxt) @@ -1808,8 +1802,6 @@ pass_local_pure_const::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_local_pure_const (gcc::context *ctxt) { @@ -1818,9 +1810,7 @@ make_pass_local_pure_const (gcc::context *ctxt) /* Emit noreturn warnings. */ -namespace { - -const pass_data pass_data_warn_function_noreturn = +static const pass_data pass_data_warn_function_noreturn = { GIMPLE_PASS, /* type */ "*warn_function_noreturn", /* name */ @@ -1833,7 +1823,7 @@ const pass_data pass_data_warn_function_noreturn = 0, /* todo_flags_finish */ }; -class pass_warn_function_noreturn : public gimple_opt_pass +class pass_warn_function_noreturn GCC_FINAL : public gimple_opt_pass { public: pass_warn_function_noreturn (gcc::context *ctxt) @@ -1852,8 +1842,6 @@ public: }; // class pass_warn_function_noreturn -} // anon namespace - gimple_opt_pass * make_pass_warn_function_noreturn (gcc::context *ctxt) { @@ -1864,9 +1852,7 @@ make_pass_warn_function_noreturn (gcc::context *ctxt) ipa_pure_const. This pass is effective when executed together with other optimization passes in early optimization pass queue. */ -namespace { - -const pass_data pass_data_nothrow = +static const pass_data pass_data_nothrow = { GIMPLE_PASS, /* type */ "nothrow", /* name */ @@ -1879,7 +1865,7 @@ const pass_data pass_data_nothrow = 0, /* todo_flags_finish */ }; -class pass_nothrow : public gimple_opt_pass +class pass_nothrow GCC_FINAL : public gimple_opt_pass { public: pass_nothrow (gcc::context *ctxt) @@ -1945,8 +1931,6 @@ pass_nothrow::execute (function *) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_nothrow (gcc::context *ctxt) { diff --git a/gcc/ipa-visibility.c b/gcc/ipa-visibility.c index 93073d80d10..00a157ab567 100644 --- a/gcc/ipa-visibility.c +++ b/gcc/ipa-visibility.c @@ -728,9 +728,7 @@ function_and_variable_visibility (bool whole_program) /* Local function pass handling visibilities. This happens before LTO streaming so in particular -fwhole-program should be ignored at this level. */ -namespace { - -const pass_data pass_data_ipa_function_and_variable_visibility = +static const pass_data pass_data_ipa_function_and_variable_visibility = { SIMPLE_IPA_PASS, /* type */ "visibility", /* name */ @@ -754,11 +752,7 @@ whole_program_function_and_variable_visibility (void) return 0; } -} // anon namespace - -namespace { - -const pass_data pass_data_ipa_whole_program_visibility = +static const pass_data pass_data_ipa_whole_program_visibility = { IPA_PASS, /* type */ "whole-program", /* name */ @@ -771,7 +765,7 @@ const pass_data pass_data_ipa_whole_program_visibility = ( TODO_remove_functions | TODO_dump_symtab ), /* todo_flags_finish */ }; -class pass_ipa_whole_program_visibility : public ipa_opt_pass_d +class pass_ipa_whole_program_visibility GCC_FINAL : public ipa_opt_pass_d { public: pass_ipa_whole_program_visibility (gcc::context *ctxt) @@ -801,8 +795,6 @@ public: }; // class pass_ipa_whole_program_visibility -} // anon namespace - ipa_opt_pass_d * make_pass_ipa_whole_program_visibility (gcc::context *ctxt) { diff --git a/gcc/ipa.c b/gcc/ipa.c index 75e367f0115..0fa93c36419 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -832,9 +832,7 @@ ipa_discover_readonly_nonaddressable_vars (void) /* Free inline summary. */ -namespace { - -const pass_data pass_data_ipa_free_inline_summary = +static const pass_data pass_data_ipa_free_inline_summary = { SIMPLE_IPA_PASS, /* type */ "free-inline-summary", /* name */ @@ -850,7 +848,7 @@ const pass_data pass_data_ipa_free_inline_summary = ( TODO_remove_functions | TODO_dump_symtab ), /* todo_flags_finish */ }; -class pass_ipa_free_inline_summary : public simple_ipa_opt_pass +class pass_ipa_free_inline_summary GCC_FINAL : public simple_ipa_opt_pass { public: pass_ipa_free_inline_summary (gcc::context *ctxt) @@ -866,8 +864,6 @@ public: }; // class pass_ipa_free_inline_summary -} // anon namespace - simple_ipa_opt_pass * make_pass_ipa_free_inline_summary (gcc::context *ctxt) { @@ -1164,9 +1160,7 @@ ipa_cdtor_merge (void) return 0; } -namespace { - -const pass_data pass_data_ipa_cdtor_merge = +static const pass_data pass_data_ipa_cdtor_merge = { IPA_PASS, /* type */ "cdtor", /* name */ @@ -1179,7 +1173,7 @@ const pass_data pass_data_ipa_cdtor_merge = 0, /* todo_flags_finish */ }; -class pass_ipa_cdtor_merge : public ipa_opt_pass_d +class pass_ipa_cdtor_merge GCC_FINAL : public ipa_opt_pass_d { public: pass_ipa_cdtor_merge (gcc::context *ctxt) @@ -1210,8 +1204,6 @@ pass_ipa_cdtor_merge::gate (function *) return !targetm.have_ctors_dtors || (optimize && in_lto_p); } -} // anon namespace - ipa_opt_pass_d * make_pass_ipa_cdtor_merge (gcc::context *ctxt) { @@ -1388,9 +1380,7 @@ ipa_single_use (void) return 0; } -namespace { - -const pass_data pass_data_ipa_single_use = +static const pass_data pass_data_ipa_single_use = { IPA_PASS, /* type */ "single-use", /* name */ @@ -1403,7 +1393,7 @@ const pass_data pass_data_ipa_single_use = 0, /* todo_flags_finish */ }; -class pass_ipa_single_use : public ipa_opt_pass_d +class pass_ipa_single_use GCC_FINAL : public ipa_opt_pass_d { public: pass_ipa_single_use (gcc::context *ctxt) @@ -1431,8 +1421,6 @@ pass_ipa_single_use::gate (function *) return optimize; } -} // anon namespace - ipa_opt_pass_d * make_pass_ipa_single_use (gcc::context *ctxt) { diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c index 4529bc29fa2..cd44f0bb33b 100644 --- a/gcc/mode-switching.c +++ b/gcc/mode-switching.c @@ -854,9 +854,7 @@ optimize_mode_switching (void) #endif /* OPTIMIZE_MODE_SWITCHING */ -namespace { - -const pass_data pass_data_mode_switching = +static const pass_data pass_data_mode_switching = { RTL_PASS, /* type */ "mode_sw", /* name */ @@ -869,7 +867,7 @@ const pass_data pass_data_mode_switching = TODO_df_finish, /* todo_flags_finish */ }; -class pass_mode_switching : public rtl_opt_pass +class pass_mode_switching GCC_FINAL : public rtl_opt_pass { public: pass_mode_switching (gcc::context *ctxt) @@ -899,8 +897,6 @@ public: }; // class pass_mode_switching -} // anon namespace - rtl_opt_pass * make_pass_mode_switching (gcc::context *ctxt) { diff --git a/gcc/omp-low.c b/gcc/omp-low.c index c1dc9191c42..57d585ad914 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -9529,9 +9529,7 @@ execute_expand_omp (void) /* OMP expansion -- the default pass, run before creation of SSA form. */ -namespace { - -const pass_data pass_data_expand_omp = +static const pass_data pass_data_expand_omp = { GIMPLE_PASS, /* type */ "ompexp", /* name */ @@ -9544,7 +9542,7 @@ const pass_data pass_data_expand_omp = 0, /* todo_flags_finish */ }; -class pass_expand_omp : public gimple_opt_pass +class pass_expand_omp GCC_FINAL : public gimple_opt_pass { public: pass_expand_omp (gcc::context *ctxt) @@ -9568,17 +9566,13 @@ public: }; // class pass_expand_omp -} // anon namespace - gimple_opt_pass * make_pass_expand_omp (gcc::context *ctxt) { return new pass_expand_omp (ctxt); } -namespace { - -const pass_data pass_data_expand_omp_ssa = +static const pass_data pass_data_expand_omp_ssa = { GIMPLE_PASS, /* type */ "ompexpssa", /* name */ @@ -9591,7 +9585,7 @@ const pass_data pass_data_expand_omp_ssa = TODO_cleanup_cfg | TODO_rebuild_alias, /* todo_flags_finish */ }; -class pass_expand_omp_ssa : public gimple_opt_pass +class pass_expand_omp_ssa GCC_FINAL : public gimple_opt_pass { public: pass_expand_omp_ssa (gcc::context *ctxt) @@ -9607,8 +9601,6 @@ public: }; // class pass_expand_omp_ssa -} // anon namespace - gimple_opt_pass * make_pass_expand_omp_ssa (gcc::context *ctxt) { @@ -11952,9 +11944,7 @@ execute_lower_omp (void) return 0; } -namespace { - -const pass_data pass_data_lower_omp = +static const pass_data pass_data_lower_omp = { GIMPLE_PASS, /* type */ "omplower", /* name */ @@ -11967,7 +11957,7 @@ const pass_data pass_data_lower_omp = 0, /* todo_flags_finish */ }; -class pass_lower_omp : public gimple_opt_pass +class pass_lower_omp GCC_FINAL : public gimple_opt_pass { public: pass_lower_omp (gcc::context *ctxt) @@ -11979,8 +11969,6 @@ public: }; // class pass_lower_omp -} // anon namespace - gimple_opt_pass * make_pass_lower_omp (gcc::context *ctxt) { @@ -12410,9 +12398,7 @@ diagnose_omp_structured_block_errors (void) return 0; } -namespace { - -const pass_data pass_data_diagnose_omp_blocks = +static const pass_data pass_data_diagnose_omp_blocks = { GIMPLE_PASS, /* type */ "*diagnose_omp_blocks", /* name */ @@ -12425,7 +12411,7 @@ const pass_data pass_data_diagnose_omp_blocks = 0, /* todo_flags_finish */ }; -class pass_diagnose_omp_blocks : public gimple_opt_pass +class pass_diagnose_omp_blocks GCC_FINAL : public gimple_opt_pass { public: pass_diagnose_omp_blocks (gcc::context *ctxt) @@ -12444,8 +12430,6 @@ public: }; // class pass_diagnose_omp_blocks -} // anon namespace - gimple_opt_pass * make_pass_diagnose_omp_blocks (gcc::context *ctxt) { @@ -13707,9 +13691,7 @@ ipa_omp_simd_clone (void) return 0; } -namespace { - -const pass_data pass_data_omp_simd_clone = +static const pass_data pass_data_omp_simd_clone = { SIMPLE_IPA_PASS, /* type */ "simdclone", /* name */ @@ -13722,7 +13704,7 @@ const pass_data pass_data_omp_simd_clone = 0, /* todo_flags_finish */ }; -class pass_omp_simd_clone : public simple_ipa_opt_pass +class pass_omp_simd_clone GCC_FINAL : public simple_ipa_opt_pass { public: pass_omp_simd_clone(gcc::context *ctxt) @@ -13743,8 +13725,6 @@ pass_omp_simd_clone::gate (function *) && (targetm.simd_clone.compute_vecsize_and_simdlen != NULL)); } -} // anon namespace - simple_ipa_opt_pass * make_pass_omp_simd_clone (gcc::context *ctxt) { diff --git a/gcc/reorg.c b/gcc/reorg.c index 1c60e13167e..8b9c9d7d5ca 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -3940,9 +3940,7 @@ rest_of_handle_delay_slots (void) return 0; } -namespace { - -const pass_data pass_data_delay_slots = +static const pass_data pass_data_delay_slots = { RTL_PASS, /* type */ "dbr", /* name */ @@ -3955,7 +3953,7 @@ const pass_data pass_data_delay_slots = 0, /* todo_flags_finish */ }; -class pass_delay_slots : public rtl_opt_pass +class pass_delay_slots GCC_FINAL : public rtl_opt_pass { public: pass_delay_slots (gcc::context *ctxt) @@ -3982,8 +3980,6 @@ pass_delay_slots::gate (function *) #endif } -} // anon namespace - rtl_opt_pass * make_pass_delay_slots (gcc::context *ctxt) { @@ -3992,9 +3988,7 @@ make_pass_delay_slots (gcc::context *ctxt) /* Machine dependent reorg pass. */ -namespace { - -const pass_data pass_data_machine_reorg = +static const pass_data pass_data_machine_reorg = { RTL_PASS, /* type */ "mach", /* name */ @@ -4007,7 +4001,7 @@ const pass_data pass_data_machine_reorg = 0, /* todo_flags_finish */ }; -class pass_machine_reorg : public rtl_opt_pass +class pass_machine_reorg GCC_FINAL : public rtl_opt_pass { public: pass_machine_reorg (gcc::context *ctxt) @@ -4028,8 +4022,6 @@ public: }; // class pass_machine_reorg -} // anon namespace - rtl_opt_pass * make_pass_machine_reorg (gcc::context *ctxt) { diff --git a/gcc/sanopt.c b/gcc/sanopt.c index 269c11d31a7..dcb3659b0a6 100644 --- a/gcc/sanopt.c +++ b/gcc/sanopt.c @@ -621,9 +621,7 @@ sanopt_optimize (function *fun) /* Perform optimization of sanitize functions. */ -namespace { - -const pass_data pass_data_sanopt = +static const pass_data pass_data_sanopt = { GIMPLE_PASS, /* type */ "sanopt", /* name */ @@ -636,7 +634,7 @@ const pass_data pass_data_sanopt = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_sanopt : public gimple_opt_pass +class pass_sanopt GCC_FINAL : public gimple_opt_pass { public: pass_sanopt (gcc::context *ctxt) @@ -745,8 +743,6 @@ pass_sanopt::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_sanopt (gcc::context *ctxt) { diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 891e6388cc4..bf7241aa9f9 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -845,9 +845,7 @@ diagnose_tm_blocks (void) return 0; } -namespace { - -const pass_data pass_data_diagnose_tm_blocks = +static const pass_data pass_data_diagnose_tm_blocks = { GIMPLE_PASS, /* type */ "*diagnose_tm_blocks", /* name */ @@ -860,7 +858,7 @@ const pass_data pass_data_diagnose_tm_blocks = 0, /* todo_flags_finish */ }; -class pass_diagnose_tm_blocks : public gimple_opt_pass +class pass_diagnose_tm_blocks GCC_FINAL : public gimple_opt_pass { public: pass_diagnose_tm_blocks (gcc::context *ctxt) @@ -873,8 +871,6 @@ public: }; // class pass_diagnose_tm_blocks -} // anon namespace - gimple_opt_pass * make_pass_diagnose_tm_blocks (gcc::context *ctxt) { @@ -1765,9 +1761,7 @@ execute_lower_tm (void) return 0; } -namespace { - -const pass_data pass_data_lower_tm = +static const pass_data pass_data_lower_tm = { GIMPLE_PASS, /* type */ "tmlower", /* name */ @@ -1780,7 +1774,7 @@ const pass_data pass_data_lower_tm = 0, /* todo_flags_finish */ }; -class pass_lower_tm : public gimple_opt_pass +class pass_lower_tm GCC_FINAL : public gimple_opt_pass { public: pass_lower_tm (gcc::context *ctxt) @@ -1793,8 +1787,6 @@ public: }; // class pass_lower_tm -} // anon namespace - gimple_opt_pass * make_pass_lower_tm (gcc::context *ctxt) { @@ -2060,9 +2052,7 @@ gate_tm_init (void) return true; } -namespace { - -const pass_data pass_data_tm_init = +static const pass_data pass_data_tm_init = { GIMPLE_PASS, /* type */ "*tminit", /* name */ @@ -2075,7 +2065,7 @@ const pass_data pass_data_tm_init = 0, /* todo_flags_finish */ }; -class pass_tm_init : public gimple_opt_pass +class pass_tm_init GCC_FINAL : public gimple_opt_pass { public: pass_tm_init (gcc::context *ctxt) @@ -2087,8 +2077,6 @@ public: }; // class pass_tm_init -} // anon namespace - gimple_opt_pass * make_pass_tm_init (gcc::context *ctxt) { @@ -3030,9 +3018,7 @@ execute_tm_mark (void) return 0; } -namespace { - -const pass_data pass_data_tm_mark = +static const pass_data pass_data_tm_mark = { GIMPLE_PASS, /* type */ "tmmark", /* name */ @@ -3045,7 +3031,7 @@ const pass_data pass_data_tm_mark = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_tm_mark : public gimple_opt_pass +class pass_tm_mark GCC_FINAL : public gimple_opt_pass { public: pass_tm_mark (gcc::context *ctxt) @@ -3057,8 +3043,6 @@ public: }; // class pass_tm_mark -} // anon namespace - gimple_opt_pass * make_pass_tm_mark (gcc::context *ctxt) { @@ -3191,9 +3175,7 @@ expand_block_edges (struct tm_region *const region, basic_block bb) /* Entry point to the final expansion of transactional nodes. */ -namespace { - -const pass_data pass_data_tm_edges = +static const pass_data pass_data_tm_edges = { GIMPLE_PASS, /* type */ "tmedge", /* name */ @@ -3206,7 +3188,7 @@ const pass_data pass_data_tm_edges = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_tm_edges : public gimple_opt_pass +class pass_tm_edges GCC_FINAL : public gimple_opt_pass { public: pass_tm_edges (gcc::context *ctxt) @@ -3243,8 +3225,6 @@ pass_tm_edges::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_tm_edges (gcc::context *ctxt) { @@ -3950,9 +3930,7 @@ execute_tm_memopt (void) return 0; } -namespace { - -const pass_data pass_data_tm_memopt = +static const pass_data pass_data_tm_memopt = { GIMPLE_PASS, /* type */ "tmmemopt", /* name */ @@ -3965,7 +3943,7 @@ const pass_data pass_data_tm_memopt = 0, /* todo_flags_finish */ }; -class pass_tm_memopt : public gimple_opt_pass +class pass_tm_memopt GCC_FINAL : public gimple_opt_pass { public: pass_tm_memopt (gcc::context *ctxt) @@ -3978,8 +3956,6 @@ public: }; // class pass_tm_memopt -} // anon namespace - gimple_opt_pass * make_pass_tm_memopt (gcc::context *ctxt) { @@ -5592,9 +5568,7 @@ ipa_tm_execute (void) return 0; } -namespace { - -const pass_data pass_data_ipa_tm = +static const pass_data pass_data_ipa_tm = { SIMPLE_IPA_PASS, /* type */ "tmipa", /* name */ @@ -5607,7 +5581,7 @@ const pass_data pass_data_ipa_tm = 0, /* todo_flags_finish */ }; -class pass_ipa_tm : public simple_ipa_opt_pass +class pass_ipa_tm GCC_FINAL : public simple_ipa_opt_pass { public: pass_ipa_tm (gcc::context *ctxt) @@ -5620,8 +5594,6 @@ public: }; // class pass_ipa_tm -} // anon namespace - simple_ipa_opt_pass * make_pass_ipa_tm (gcc::context *ctxt) { diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index c1ca468fa25..609bf4a28bf 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -2137,9 +2137,7 @@ lower_eh_constructs_1 (struct leh_state *state, gimple_seq *pseq) lower_eh_constructs_2 (state, &gsi); } -namespace { - -const pass_data pass_data_lower_eh = +static const pass_data pass_data_lower_eh = { GIMPLE_PASS, /* type */ "eh", /* name */ @@ -2152,7 +2150,7 @@ const pass_data pass_data_lower_eh = 0, /* todo_flags_finish */ }; -class pass_lower_eh : public gimple_opt_pass +class pass_lower_eh GCC_FINAL : public gimple_opt_pass { public: pass_lower_eh (gcc::context *ctxt) @@ -2207,8 +2205,6 @@ pass_lower_eh::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_lower_eh (gcc::context *ctxt) { @@ -3113,9 +3109,7 @@ refactor_eh_r (gimple_seq seq) } } -namespace { - -const pass_data pass_data_refactor_eh = +static const pass_data pass_data_refactor_eh = { GIMPLE_PASS, /* type */ "ehopt", /* name */ @@ -3128,7 +3122,7 @@ const pass_data pass_data_refactor_eh = 0, /* todo_flags_finish */ }; -class pass_refactor_eh : public gimple_opt_pass +class pass_refactor_eh GCC_FINAL : public gimple_opt_pass { public: pass_refactor_eh (gcc::context *ctxt) @@ -3145,8 +3139,6 @@ public: }; // class pass_refactor_eh -} // anon namespace - gimple_opt_pass * make_pass_refactor_eh (gcc::context *ctxt) { @@ -3303,9 +3295,7 @@ lower_resx (basic_block bb, gresx *stmt, return ret; } -namespace { - -const pass_data pass_data_lower_resx = +static const pass_data pass_data_lower_resx = { GIMPLE_PASS, /* type */ "resx", /* name */ @@ -3318,7 +3308,7 @@ const pass_data pass_data_lower_resx = 0, /* todo_flags_finish */ }; -class pass_lower_resx : public gimple_opt_pass +class pass_lower_resx GCC_FINAL : public gimple_opt_pass { public: pass_lower_resx (gcc::context *ctxt) @@ -3360,8 +3350,6 @@ pass_lower_resx::execute (function *fun) return any_rewritten ? TODO_update_ssa_only_virtuals : 0; } -} // anon namespace - gimple_opt_pass * make_pass_lower_resx (gcc::context *ctxt) { @@ -3700,9 +3688,7 @@ lower_eh_dispatch (basic_block src, geh_dispatch *stmt) return redirected; } -namespace { - -const pass_data pass_data_lower_eh_dispatch = +static const pass_data pass_data_lower_eh_dispatch = { GIMPLE_PASS, /* type */ "ehdisp", /* name */ @@ -3715,7 +3701,7 @@ const pass_data pass_data_lower_eh_dispatch = 0, /* todo_flags_finish */ }; -class pass_lower_eh_dispatch : public gimple_opt_pass +class pass_lower_eh_dispatch GCC_FINAL : public gimple_opt_pass { public: pass_lower_eh_dispatch (gcc::context *ctxt) @@ -3762,8 +3748,6 @@ pass_lower_eh_dispatch::execute (function *fun) return flags; } -} // anon namespace - gimple_opt_pass * make_pass_lower_eh_dispatch (gcc::context *ctxt) { @@ -4572,9 +4556,7 @@ execute_cleanup_eh_1 (void) return 0; } -namespace { - -const pass_data pass_data_cleanup_eh = +static const pass_data pass_data_cleanup_eh = { GIMPLE_PASS, /* type */ "ehcleanup", /* name */ @@ -4587,7 +4569,7 @@ const pass_data pass_data_cleanup_eh = 0, /* todo_flags_finish */ }; -class pass_cleanup_eh : public gimple_opt_pass +class pass_cleanup_eh GCC_FINAL : public gimple_opt_pass { public: pass_cleanup_eh (gcc::context *ctxt) @@ -4620,8 +4602,6 @@ pass_cleanup_eh::execute (function *fun) return ret; } -} // anon namespace - gimple_opt_pass * make_pass_cleanup_eh (gcc::context *ctxt) { diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 291e6020b25..7ecbe4a1d2f 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2734,9 +2734,7 @@ tree_if_conversion (struct loop *loop) /* Tree if-conversion pass management. */ -namespace { - -const pass_data pass_data_if_conversion = +static const pass_data pass_data_if_conversion = { GIMPLE_PASS, /* type */ "ifcvt", /* name */ @@ -2749,7 +2747,7 @@ const pass_data pass_data_if_conversion = 0, /* todo_flags_finish */ }; -class pass_if_conversion : public gimple_opt_pass +class pass_if_conversion GCC_FINAL : public gimple_opt_pass { public: pass_if_conversion (gcc::context *ctxt) @@ -2798,8 +2796,6 @@ pass_if_conversion::execute (function *fun) return todo; } -} // anon namespace - gimple_opt_pass * make_pass_if_conversion (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index aeb7f28f03b..61bef85cbd1 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -301,9 +301,7 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug) } -namespace { - -const pass_data pass_data_rename_ssa_copies = +static const pass_data pass_data_rename_ssa_copies = { GIMPLE_PASS, /* type */ "copyrename", /* name */ @@ -316,7 +314,7 @@ const pass_data pass_data_rename_ssa_copies = 0, /* todo_flags_finish */ }; -class pass_rename_ssa_copies : public gimple_opt_pass +class pass_rename_ssa_copies GCC_FINAL : public gimple_opt_pass { public: pass_rename_ssa_copies (gcc::context *ctxt) @@ -466,8 +464,6 @@ pass_rename_ssa_copies::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_rename_ssa_copies (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 2d2edc80116..7c23393a86a 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -1689,9 +1689,7 @@ tree_ssa_cd_dce (void) return perform_tree_ssa_dce (/*aggressive=*/optimize >= 2); } -namespace { - -const pass_data pass_data_dce = +static const pass_data pass_data_dce = { GIMPLE_PASS, /* type */ "dce", /* name */ @@ -1704,7 +1702,7 @@ const pass_data pass_data_dce = 0, /* todo_flags_finish */ }; -class pass_dce : public gimple_opt_pass +class pass_dce GCC_FINAL : public gimple_opt_pass { public: pass_dce (gcc::context *ctxt) @@ -1718,17 +1716,13 @@ public: }; // class pass_dce -} // anon namespace - gimple_opt_pass * make_pass_dce (gcc::context *ctxt) { return new pass_dce (ctxt); } -namespace { - -const pass_data pass_data_cd_dce = +static const pass_data pass_data_cd_dce = { GIMPLE_PASS, /* type */ "cddce", /* name */ @@ -1741,7 +1735,7 @@ const pass_data pass_data_cd_dce = 0, /* todo_flags_finish */ }; -class pass_cd_dce : public gimple_opt_pass +class pass_cd_dce GCC_FINAL : public gimple_opt_pass { public: pass_cd_dce (gcc::context *ctxt) @@ -1755,8 +1749,6 @@ public: }; // class pass_cd_dce -} // anon namespace - gimple_opt_pass * make_pass_cd_dce (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 3eb003c728a..a2742377e41 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -1131,9 +1131,7 @@ private: every new symbol exposed, its corresponding bit will be set in VARS_TO_RENAME. */ -namespace { - -const pass_data pass_data_dominator = +static const pass_data pass_data_dominator = { GIMPLE_PASS, /* type */ "dom", /* name */ @@ -1146,7 +1144,7 @@ const pass_data pass_data_dominator = ( TODO_cleanup_cfg | TODO_update_ssa ), /* todo_flags_finish */ }; -class pass_dominator : public gimple_opt_pass +class pass_dominator GCC_FINAL : public gimple_opt_pass { public: pass_dominator (gcc::context *ctxt) @@ -1299,8 +1297,6 @@ pass_dominator::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_dominator (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index 4ad19b3bc60..03356458943 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -347,9 +347,7 @@ dse_dom_walker::before_dom_children (basic_block bb) } } -namespace { - -const pass_data pass_data_dse = +static const pass_data pass_data_dse = { GIMPLE_PASS, /* type */ "dse", /* name */ @@ -362,7 +360,7 @@ const pass_data pass_data_dse = 0, /* todo_flags_finish */ }; -class pass_dse : public gimple_opt_pass +class pass_dse GCC_FINAL : public gimple_opt_pass { public: pass_dse (gcc::context *ctxt) @@ -409,8 +407,6 @@ pass_dse::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_dse (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index ccfde5f1e36..27aacc225c2 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -2075,9 +2075,7 @@ fwprop_ssa_val (tree name) /* Main entry point for the forward propagation and statement combine optimizer. */ -namespace { - -const pass_data pass_data_forwprop = +static const pass_data pass_data_forwprop = { GIMPLE_PASS, /* type */ "forwprop", /* name */ @@ -2090,7 +2088,7 @@ const pass_data pass_data_forwprop = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_forwprop : public gimple_opt_pass +class pass_forwprop GCC_FINAL : public gimple_opt_pass { public: pass_forwprop (gcc::context *ctxt) @@ -2477,8 +2475,6 @@ pass_forwprop::execute (function *fun) return todoflags; } -} // anon namespace - gimple_opt_pass * make_pass_forwprop (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index 8118f357852..8b7a02d588c 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -590,9 +590,7 @@ sink_code_in_bb (basic_block bb) Note that this reduces the number of computations of a = b + c to 1 when we take the else edge, instead of 2. */ -namespace { - -const pass_data pass_data_sink_code = +static const pass_data pass_data_sink_code = { GIMPLE_PASS, /* type */ "sink", /* name */ @@ -607,7 +605,7 @@ const pass_data pass_data_sink_code = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_sink_code : public gimple_opt_pass +class pass_sink_code GCC_FINAL : public gimple_opt_pass { public: pass_sink_code (gcc::context *ctxt) @@ -638,8 +636,6 @@ pass_sink_code::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_sink_code (gcc::context *ctxt) { diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index 910cb19b8d1..a3c64ab8ea4 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -576,9 +576,7 @@ replace_ssa_name_symbol (tree ssa_name, tree sym) version namespace. This is used to keep footprint of compiler during interprocedural optimization. */ -namespace { - -const pass_data pass_data_release_ssa_names = +static const pass_data pass_data_release_ssa_names = { GIMPLE_PASS, /* type */ "release_ssa", /* name */ @@ -591,7 +589,7 @@ const pass_data pass_data_release_ssa_names = 0, /* todo_flags_finish */ }; -class pass_release_ssa_names : public gimple_opt_pass +class pass_release_ssa_names GCC_FINAL : public gimple_opt_pass { public: pass_release_ssa_names (gcc::context *ctxt) @@ -637,8 +635,6 @@ pass_release_ssa_names::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_release_ssa_names (gcc::context *ctxt) { diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index cd595a94f68..fe19da4c338 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -1114,9 +1114,7 @@ expand_ifn_va_arg (function *fun) #endif } -namespace { - -const pass_data pass_data_stdarg = +static const pass_data pass_data_stdarg = { GIMPLE_PASS, /* type */ "stdarg", /* name */ @@ -1129,7 +1127,7 @@ const pass_data pass_data_stdarg = 0, /* todo_flags_finish */ }; -class pass_stdarg : public gimple_opt_pass +class pass_stdarg GCC_FINAL : public gimple_opt_pass { public: pass_stdarg (gcc::context *ctxt) @@ -1165,17 +1163,13 @@ pass_stdarg::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_stdarg (gcc::context *ctxt) { return new pass_stdarg (ctxt); } -namespace { - -const pass_data pass_data_lower_vaarg = +static const pass_data pass_data_lower_vaarg = { GIMPLE_PASS, /* type */ "lower_vaarg", /* name */ @@ -1188,7 +1182,7 @@ const pass_data pass_data_lower_vaarg = 0, /* todo_flags_finish */ }; -class pass_lower_vaarg : public gimple_opt_pass +class pass_lower_vaarg GCC_FINAL : public gimple_opt_pass { public: pass_lower_vaarg (gcc::context *ctxt) @@ -1212,8 +1206,6 @@ pass_lower_vaarg::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_lower_vaarg (gcc::context *ctxt) { diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 7b723c2caeb..08b5807ff19 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -1092,9 +1092,7 @@ execute_tail_calls (void) return tree_optimize_tail_calls_1 (true); } -namespace { - -const pass_data pass_data_tail_recursion = +static const pass_data pass_data_tail_recursion = { GIMPLE_PASS, /* type */ "tailr", /* name */ @@ -1107,7 +1105,7 @@ const pass_data pass_data_tail_recursion = 0, /* todo_flags_finish */ }; -class pass_tail_recursion : public gimple_opt_pass +class pass_tail_recursion GCC_FINAL : public gimple_opt_pass { public: pass_tail_recursion (gcc::context *ctxt) @@ -1124,17 +1122,13 @@ public: }; // class pass_tail_recursion -} // anon namespace - gimple_opt_pass * make_pass_tail_recursion (gcc::context *ctxt) { return new pass_tail_recursion (ctxt); } -namespace { - -const pass_data pass_data_tail_calls = +static const pass_data pass_data_tail_calls = { GIMPLE_PASS, /* type */ "tailc", /* name */ @@ -1147,7 +1141,7 @@ const pass_data pass_data_tail_calls = 0, /* todo_flags_finish */ }; -class pass_tail_calls : public gimple_opt_pass +class pass_tail_calls GCC_FINAL : public gimple_opt_pass { public: pass_tail_calls (gcc::context *ctxt) @@ -1160,8 +1154,6 @@ public: }; // class pass_tail_calls -} // anon namespace - gimple_opt_pass * make_pass_tail_calls (gcc::context *ctxt) { diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index be3d27fbdf3..8fe71afba05 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -1705,9 +1705,7 @@ expand_vector_operations (void) return cfg_changed ? TODO_cleanup_cfg : 0; } -namespace { - -const pass_data pass_data_lower_vector = +static const pass_data pass_data_lower_vector = { GIMPLE_PASS, /* type */ "veclower", /* name */ @@ -1720,7 +1718,7 @@ const pass_data pass_data_lower_vector = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_lower_vector : public gimple_opt_pass +class pass_lower_vector GCC_FINAL : public gimple_opt_pass { public: pass_lower_vector (gcc::context *ctxt) @@ -1740,17 +1738,13 @@ public: }; // class pass_lower_vector -} // anon namespace - gimple_opt_pass * make_pass_lower_vector (gcc::context *ctxt) { return new pass_lower_vector (ctxt); } -namespace { - -const pass_data pass_data_lower_vector_ssa = +static const pass_data pass_data_lower_vector_ssa = { GIMPLE_PASS, /* type */ "veclower2", /* name */ @@ -1764,7 +1758,7 @@ const pass_data pass_data_lower_vector_ssa = | TODO_cleanup_cfg ), /* todo_flags_finish */ }; -class pass_lower_vector_ssa : public gimple_opt_pass +class pass_lower_vector_ssa GCC_FINAL : public gimple_opt_pass { public: pass_lower_vector_ssa (gcc::context *ctxt) @@ -1780,8 +1774,6 @@ public: }; // class pass_lower_vector_ssa -} // anon namespace - gimple_opt_pass * make_pass_lower_vector_ssa (gcc::context *ctxt) { diff --git a/gcc/tree.c b/gcc/tree.c index 3c2c20a82b4..92b95a6a5b4 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5948,9 +5948,7 @@ free_lang_data (void) } -namespace { - -const pass_data pass_data_ipa_free_lang_data = +static const pass_data pass_data_ipa_free_lang_data = { SIMPLE_IPA_PASS, /* type */ "*free_lang_data", /* name */ @@ -5963,7 +5961,7 @@ const pass_data pass_data_ipa_free_lang_data = 0, /* todo_flags_finish */ }; -class pass_ipa_free_lang_data : public simple_ipa_opt_pass +class pass_ipa_free_lang_data GCC_FINAL : public simple_ipa_opt_pass { public: pass_ipa_free_lang_data (gcc::context *ctxt) @@ -5975,8 +5973,6 @@ public: }; // class pass_ipa_free_lang_data -} // anon namespace - simple_ipa_opt_pass * make_pass_ipa_free_lang_data (gcc::context *ctxt) { diff --git a/gcc/ubsan.c b/gcc/ubsan.c index 7983c930c66..e88c367cc99 100644 --- a/gcc/ubsan.c +++ b/gcc/ubsan.c @@ -1896,9 +1896,7 @@ do_ubsan_in_current_function () DECL_ATTRIBUTES (current_function_decl))); } -namespace { - -const pass_data pass_data_ubsan = +static const pass_data pass_data_ubsan = { GIMPLE_PASS, /* type */ "ubsan", /* name */ @@ -1911,7 +1909,7 @@ const pass_data pass_data_ubsan = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_ubsan : public gimple_opt_pass +class pass_ubsan GCC_FINAL : public gimple_opt_pass { public: pass_ubsan (gcc::context *ctxt) @@ -2001,8 +1999,6 @@ pass_ubsan::execute (function *fun) return 0; } -} // anon namespace - gimple_opt_pass * make_pass_ubsan (gcc::context *ctxt) { diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index da9de28af7b..028dc22a72b 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -10325,9 +10325,7 @@ variable_tracking_main (void) return ret; } -namespace { - -const pass_data pass_data_variable_tracking = +static const pass_data pass_data_variable_tracking = { RTL_PASS, /* type */ "vartrack", /* name */ @@ -10340,7 +10338,7 @@ const pass_data pass_data_variable_tracking = 0, /* todo_flags_finish */ }; -class pass_variable_tracking : public rtl_opt_pass +class pass_variable_tracking GCC_FINAL : public rtl_opt_pass { public: pass_variable_tracking (gcc::context *ctxt) @@ -10360,8 +10358,6 @@ public: }; // class pass_variable_tracking -} // anon namespace - rtl_opt_pass * make_pass_variable_tracking (gcc::context *ctxt) { diff --git a/gcc/vtable-verify.c b/gcc/vtable-verify.c index a8345882045..6e2b6bb6298 100644 --- a/gcc/vtable-verify.c +++ b/gcc/vtable-verify.c @@ -801,9 +801,7 @@ verify_bb_vtables (basic_block bb) /* Definition of this optimization pass. */ -namespace { - -const pass_data pass_data_vtable_verify = +static const pass_data pass_data_vtable_verify = { GIMPLE_PASS, /* type */ "vtable-verify", /* name */ @@ -816,7 +814,7 @@ const pass_data pass_data_vtable_verify = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_vtable_verify : public gimple_opt_pass +class pass_vtable_verify GCC_FINAL : public gimple_opt_pass { public: pass_vtable_verify (gcc::context *ctxt) @@ -845,8 +843,6 @@ pass_vtable_verify::execute (function *fun) return ret; } -} // anon namespace - gimple_opt_pass * make_pass_vtable_verify (gcc::context *ctxt) { diff --git a/gcc/web.c b/gcc/web.c index 839b03e94a3..58ae58c07a9 100644 --- a/gcc/web.c +++ b/gcc/web.c @@ -306,9 +306,7 @@ replace_ref (df_ref ref, rtx reg) } -namespace { - -const pass_data pass_data_web = +static const pass_data pass_data_web = { RTL_PASS, /* type */ "web", /* name */ @@ -321,7 +319,7 @@ const pass_data pass_data_web = TODO_df_finish, /* todo_flags_finish */ }; -class pass_web : public rtl_opt_pass +class pass_web GCC_FINAL : public rtl_opt_pass { public: pass_web (gcc::context *ctxt) @@ -426,8 +424,6 @@ pass_web::execute (function *fun) return 0; } -} // anon namespace - rtl_opt_pass * make_pass_web (gcc::context *ctxt) {