OSDN Git Service

Backport from upstream Libtool:
[pf3gnuchains/gcc-fork.git] / gcc / tree-nomudflap.c
index e48aff2..8e618a1 100644 (file)
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-inline.h"
 #include "c-tree.h"
 #include "c-common.h"
-#include "tree-gimple.h"
+#include "gimple.h"
 #include "diagnostic.h"
 #include "hashtab.h"
 #include "output.h"
@@ -84,10 +84,18 @@ mf_mark (tree t ATTRIBUTE_UNUSED)
 
 /* The pass structures must exist, but need not do anything.  */
 
-struct tree_opt_pass pass_mudflap_1 = 
+static bool
+gate_mudflap (void)
 {
+  return flag_mudflap != 0;
+}
+
+struct gimple_opt_pass pass_mudflap_1 = 
+{
+ {
+  GIMPLE_PASS,
   "mudflap1",                          /* name */
-  NULL,                                        /* gate */
+  gate_mudflap,                         /* gate */
   NULL,                                        /* execute */
   NULL,                                        /* sub */
   NULL,                                        /* next */
@@ -97,14 +105,16 @@ struct tree_opt_pass pass_mudflap_1 =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  0,                                    /* todo_flags_finish */
-  0                                    /* letter */
+  0                                     /* todo_flags_finish */
+ }
 };
 
-struct tree_opt_pass pass_mudflap_2 = 
+struct gimple_opt_pass pass_mudflap_2 = 
 {
+ {
+  GIMPLE_PASS,
   "mudflap2",                          /* name */
-  NULL,                                        /* gate */
+  gate_mudflap,                         /* gate */
   NULL,                                        /* execute */
   NULL,                                        /* sub */
   NULL,                                        /* next */
@@ -114,8 +124,8 @@ struct tree_opt_pass pass_mudflap_2 =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  0,                                    /* todo_flags_finish */
-  0                                    /* letter */
+  0                                     /* todo_flags_finish */
+ }
 };
 
 /* Instead of: