diff options
Diffstat (limited to 'gcc/web.c')
-rw-r--r-- | gcc/web.c | 52 |
1 files changed, 35 insertions, 17 deletions
@@ -449,22 +449,40 @@ web_main (void) return 0; } -struct rtl_opt_pass pass_web = +namespace { + +const pass_data pass_data_web = { - { - RTL_PASS, - "web", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - gate_handle_web, /* gate */ - web_main, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_WEB, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */ - } + RTL_PASS, /* type */ + "web", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ + true, /* has_gate */ + true, /* has_execute */ + TV_WEB, /* tv_id */ + 0, /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + ( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */ }; + +class pass_web : public rtl_opt_pass +{ +public: + pass_web(gcc::context *ctxt) + : rtl_opt_pass(pass_data_web, ctxt) + {} + + /* opt_pass methods: */ + bool gate () { return gate_handle_web (); } + unsigned int execute () { return web_main (); } + +}; // class pass_web + +} // anon namespace + +rtl_opt_pass * +make_pass_web (gcc::context *ctxt) +{ + return new pass_web (ctxt); +} |