OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / tree-nomudflap.c
1 /* Mudflap: narrow-pointer bounds-checking by tree rewriting.
2    Copyright (C) 2001, 2002, 2003, 2007, 2008, 2009
3    Free Software Foundation, Inc.
4    Contributed by Frank Ch. Eigler <fche@redhat.com>
5
6 This file is part of GCC.
7
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 3, or (at your option) any later
11 version.
12
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16 for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3.  If not see
20 <http://www.gnu.org/licenses/>.  */
21
22
23 #include "config.h"
24 #include "system.h"
25 #include "coretypes.h"
26 #include "tm.h"
27 #include "tree.h"
28 #include "tree-inline.h"
29 #include "gimple.h"
30 #include "diagnostic.h"
31 #include "hashtab.h"
32 #include "output.h"
33 #include "langhooks.h"
34 #include "tree-mudflap.h"
35 #include "tree-pass.h"
36 #include "ggc.h"
37 #include "toplev.h"
38
39
40
41 /* This file contains placeholder functions, to be used only for
42    language processors that cannot handle tree-mudflap.c directly.
43    (e.g. Fortran).  */
44
45 static void
46 nogo (void)
47 {
48   internal_error ("mudflap: this language is not supported");
49 }
50
51 void
52 mudflap_enqueue_decl (tree obj ATTRIBUTE_UNUSED)
53 {
54   nogo ();
55 }
56
57 void
58 mudflap_enqueue_constant (tree obj ATTRIBUTE_UNUSED)
59 {
60   nogo ();
61 }
62
63 void
64 mudflap_finish_file (void)
65 {
66   nogo ();
67 }
68
69 int
70 mf_marked_p (tree t ATTRIBUTE_UNUSED)
71 {
72   nogo ();
73   return 0;
74 }
75
76 tree
77 mf_mark (tree t ATTRIBUTE_UNUSED)
78 {
79   nogo ();
80   return NULL;
81 }
82
83 /* The pass structures must exist, but need not do anything.  */
84
85 static bool
86 gate_mudflap (void)
87 {
88   return flag_mudflap != 0;
89 }
90
91 struct gimple_opt_pass pass_mudflap_1 =
92 {
93  {
94   GIMPLE_PASS,
95   "mudflap1",                           /* name */
96   gate_mudflap,                         /* gate */
97   NULL,                                 /* execute */
98   NULL,                                 /* sub */
99   NULL,                                 /* next */
100   0,                                    /* static_pass_number */
101   TV_NONE,                              /* tv_id */
102   0,                                    /* properties_required */
103   0,                                    /* properties_provided */
104   0,                                    /* properties_destroyed */
105   0,                                    /* todo_flags_start */
106   0                                     /* todo_flags_finish */
107  }
108 };
109
110 struct gimple_opt_pass pass_mudflap_2 =
111 {
112  {
113   GIMPLE_PASS,
114   "mudflap2",                           /* name */
115   gate_mudflap,                         /* gate */
116   NULL,                                 /* execute */
117   NULL,                                 /* sub */
118   NULL,                                 /* next */
119   0,                                    /* static_pass_number */
120   TV_NONE,                              /* tv_id */
121   0,                                    /* properties_required */
122   0,                                    /* properties_provided */
123   0,                                    /* properties_destroyed */
124   0,                                    /* todo_flags_start */
125   0                                     /* todo_flags_finish */
126  }
127 };
128
129 /* Instead of:
130 #include "gt-tree-mudflap.h"
131 We prepare a little dummy struct here.
132 */
133
134 EXPORTED_CONST struct ggc_root_tab gt_ggc_r_gt_tree_mudflap_h[] = {
135   LAST_GGC_ROOT_TAB
136 };