OSDN Git Service

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