t-mep (mep-pragma.o): Use $(COMPILER) to compile mep-pragma.c.
[platform/upstream/gcc.git] / gcc / tree-nomudflap.c
1 /* Mudflap: narrow-pointer bounds-checking by tree rewriting.
2    Copyright (C) 2001, 2002, 2003, 2007, 2008, 2009, 2010
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 "hashtab.h"
31 #include "langhooks.h"
32 #include "tree-mudflap.h"
33 #include "tree-pass.h"
34 #include "ggc.h"
35 #include "diagnostic-core.h"
36
37
38
39 /* This file contains placeholder functions, to be used only for
40    language processors that cannot handle tree-mudflap.c directly.
41    (e.g. Fortran).  */
42
43 static void
44 nogo (void)
45 {
46   sorry ("mudflap: this language is not supported");
47 }
48
49 void
50 mudflap_enqueue_decl (tree obj ATTRIBUTE_UNUSED)
51 {
52   nogo ();
53 }
54
55 void
56 mudflap_enqueue_constant (tree obj ATTRIBUTE_UNUSED)
57 {
58   nogo ();
59 }
60
61 void
62 mudflap_finish_file (void)
63 {
64   nogo ();
65 }
66
67 int
68 mf_marked_p (tree t ATTRIBUTE_UNUSED)
69 {
70   nogo ();
71   return 0;
72 }
73
74 tree
75 mf_mark (tree t ATTRIBUTE_UNUSED)
76 {
77   nogo ();
78   return NULL;
79 }
80
81 /* The pass structures must exist, but need not do anything.  */
82
83 static bool
84 gate_mudflap (void)
85 {
86   return flag_mudflap != 0;
87 }
88
89 struct gimple_opt_pass pass_mudflap_1 =
90 {
91  {
92   GIMPLE_PASS,
93   "mudflap1",                           /* name */
94   gate_mudflap,                         /* gate */
95   NULL,                                 /* execute */
96   NULL,                                 /* sub */
97   NULL,                                 /* next */
98   0,                                    /* static_pass_number */
99   TV_NONE,                              /* tv_id */
100   0,                                    /* properties_required */
101   0,                                    /* properties_provided */
102   0,                                    /* properties_destroyed */
103   0,                                    /* todo_flags_start */
104   0                                     /* todo_flags_finish */
105  }
106 };
107
108 struct gimple_opt_pass pass_mudflap_2 =
109 {
110  {
111   GIMPLE_PASS,
112   "mudflap2",                           /* name */
113   gate_mudflap,                         /* gate */
114   NULL,                                 /* execute */
115   NULL,                                 /* sub */
116   NULL,                                 /* next */
117   0,                                    /* static_pass_number */
118   TV_NONE,                              /* tv_id */
119   0,                                    /* properties_required */
120   0,                                    /* properties_provided */
121   0,                                    /* properties_destroyed */
122   0,                                    /* todo_flags_start */
123   0                                     /* todo_flags_finish */
124  }
125 };
126
127 /* Instead of:
128 #include "gt-tree-mudflap.h"
129 We prepare a little dummy struct here.
130 */
131
132 EXPORTED_CONST struct ggc_root_tab gt_ggc_r_gt_tree_mudflap_h[] = {
133   LAST_GGC_ROOT_TAB
134 };