aboutsummaryrefslogtreecommitdiff
path: root/gcc/vtable-verify.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/vtable-verify.c')
-rw-r--r--gcc/vtable-verify.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/gcc/vtable-verify.c b/gcc/vtable-verify.c
index 601b2ce..b99ff6c 100644
--- a/gcc/vtable-verify.c
+++ b/gcc/vtable-verify.c
@@ -723,23 +723,6 @@ verify_bb_vtables (basic_block bb)
}
}
-/* Main function, called from pass->excute(). Loop through all the
- basic blocks in the current function, passing them to
- verify_bb_vtables, which searches for virtual calls, and inserts
- calls to __VLTVerifyVtablePointer. */
-
-unsigned int
-vtable_verify_main (void)
-{
- unsigned int ret = 1;
- basic_block bb;
-
- FOR_ALL_BB_FN (bb, cfun)
- verify_bb_vtables (bb);
-
- return ret;
-}
-
/* Definition of this optimization pass. */
namespace {
@@ -767,10 +750,26 @@ public:
/* opt_pass methods: */
virtual bool gate (function *) { return (flag_vtable_verify); }
- unsigned int execute () { return vtable_verify_main (); }
+ virtual unsigned int execute (function *);
}; // class pass_vtable_verify
+/* Loop through all the basic blocks in the current function, passing them to
+ verify_bb_vtables, which searches for virtual calls, and inserts
+ calls to __VLTVerifyVtablePointer. */
+
+unsigned int
+pass_vtable_verify::execute (function *fun)
+{
+ unsigned int ret = 1;
+ basic_block bb;
+
+ FOR_ALL_BB_FN (bb, fun)
+ verify_bb_vtables (bb);
+
+ return ret;
+}
+
} // anon namespace
gimple_opt_pass *