@@ -1,3 +1,14 @@
+2013-08-05 David Malcolm <dmalcolm@redhat.com>
+
+ Patch autogenerated by refactor_passes.py from
+ https://github.com/davidmalcolm/gcc-refactoring-scripts
+ revision 03fe39476a4c4ea450b49e087cfa817b5f92021e
+
+ * vtable-verify.c (pass_vtable_verify): Convert from a global struct
+ to a subclass of gimple_opt_pass along with...
+ (pass_data_vtable_verify): ...new pass_data instance and...
+ (make_pass_vtable_verify): ...new function.
+
2013-05-31 Yuri Rumyantsev <yuri.s.rumyantsev@intel.com>
Igor Zamyatin <igor.zamyatin@intel.com>
@@ -762,24 +762,42 @@ gate_tree_vtable_verify (void)
/* Definition of this optimization pass. */
-struct gimple_opt_pass pass_vtable_verify =
+namespace {
+
+const pass_data pass_data_vtable_verify =
{
- {
- GIMPLE_PASS,
- "vtable-verify", /* name */
- OPTGROUP_NONE, /* optinfo_flags */
- gate_tree_vtable_verify, /* gate */
- vtable_verify_main, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_VTABLE_VERIFICATION, /* tv_id */
- PROP_cfg | PROP_ssa, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_update_ssa /* todo_flags_finish */
- }
+ GIMPLE_PASS, /* type */
+ "vtable-verify", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_VTABLE_VERIFICATION, /* tv_id */
+ ( PROP_cfg | PROP_ssa ), /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_update_ssa, /* todo_flags_finish */
};
+class pass_vtable_verify : public gimple_opt_pass
+{
+public:
+ pass_vtable_verify(gcc::context *ctxt)
+ : gimple_opt_pass(pass_data_vtable_verify, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ bool gate () { return gate_tree_vtable_verify (); }
+ unsigned int execute () { return vtable_verify_main (); }
+
+}; // class pass_vtable_verify
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_vtable_verify (gcc::context *ctxt)
+{
+ return new pass_vtable_verify (ctxt);
+}
+
#include "gt-vtable-verify.h"