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