OSDN Git Service

2008-02-10 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / tree-nomudflap.c
index c3f2bf0..a59b9da 100644 (file)
@@ -1,12 +1,12 @@
 /* Mudflap: narrow-pointer bounds-checking by tree rewriting.
-   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
    Contributed by Frank Ch. Eigler <fche@redhat.com>
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -15,9 +15,8 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 
 #include "config.h"
@@ -85,10 +84,16 @@ mf_mark (tree t ATTRIBUTE_UNUSED)
 
 /* The pass structures must exist, but need not do anything.  */
 
+static bool
+gate_mudflap (void)
+{
+  return flag_mudflap != 0;
+}
+
 struct tree_opt_pass pass_mudflap_1 = 
 {
   "mudflap1",                          /* name */
-  NULL,                                        /* gate */
+  gate_mudflap,                         /* gate */
   NULL,                                        /* execute */
   NULL,                                        /* sub */
   NULL,                                        /* next */
@@ -105,7 +110,7 @@ struct tree_opt_pass pass_mudflap_1 =
 struct tree_opt_pass pass_mudflap_2 = 
 {
   "mudflap2",                          /* name */
-  NULL,                                        /* gate */
+  gate_mudflap,                         /* gate */
   NULL,                                        /* execute */
   NULL,                                        /* sub */
   NULL,                                        /* next */