summaryrefslogtreecommitdiff
path: root/support/cpp/gcc/cc1_dummies.cc
blob: 4476703b0495e506a081e868b2b69e1c5eaf9db4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
// dummies for function used in cc1

#define SDCPP_DUMMY_FCT() fprintf(stderr, "unreachable dummy in cc1%s\n", __func__); gcc_assert(false)
#define untested() fprintf(stderr, "untested in cc1: %s\n", __func__)
#define CC1_DUMMIES

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "bitmap.h"

#include "tree-core.h"
#include "langhooks.h"
#include "langhooks-def.h"

#include "incpath.h"
#include "c/c-parser.h"
#include "substring-locations.h"
#include "pass_manager.h"

void bitmap_obstack_initialize(bitmap_obstack*)
{
}
void bitmap_obstack_free(bitmap_head*)
{ SDCPP_DUMMY_FCT();
}
void bitmap_obstack_release(bitmap_obstack*)
{ SDCPP_DUMMY_FCT();
}
bitmap bitmap_alloc(bitmap_obstack*)
{
  static bitmap bogus_bitmap;
  return bogus_bitmap;
}
void init_eh(void)
{
}
tree build_tree_list(tree_node*, tree_node*)
{ SDCPP_DUMMY_FCT();
	return tree();
}
bool c_block_may_fallthru(tree_node const*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
void c_common_read_pch(cpp_reader*, char const*, int, char const*)
{ SDCPP_DUMMY_FCT();
}
int c_common_valid_pch(cpp_reader*, char const*, int)
{ SDCPP_DUMMY_FCT();
	return 0;
}
bool c_dump_tree(void*, tree_node*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
int c_get_alias_set(tree_node*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
void c_initialize_diagnostics(diagnostic_context*)
{
}
int c_gimplify_expr(tree_node**, gimple**, gimple**)
{ SDCPP_DUMMY_FCT();
	return 0;
}
bool c_missing_noreturn_ok_p(tree_node*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
void c_parse_file()
{ SDCPP_DUMMY_FCT();
}
void c_parse_final_cleanups()
{ SDCPP_DUMMY_FCT();
}
void c_print_identifier(FILE*, tree_node*, int)
{ SDCPP_DUMMY_FCT();
}
void c_stddef_cpp_builtins()
{ SDCPP_DUMMY_FCT();
}
int c_types_compatible_p(tree_node*, tree_node*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
void default_options_optimization(gcc_options*, gcc_options*, cl_decoded_option*, unsigned int, unsigned int, unsigned int, cl_option_handlers const*, diagnostic_context*)
{
}
void define_language_independent_builtin_macros(cpp_reader*)
{ untested();
}
void dump_end(int, FILE*)
{ SDCPP_DUMMY_FCT();
}
void dbg_cnt_list_all_counters()
{ SDCPP_DUMMY_FCT();
}
FILE* dump_begin(int, dump_flag*, int)
{ SDCPP_DUMMY_FCT();
	return NULL;
}
void dump_profile_report()
{ SDCPP_DUMMY_FCT();
}
const struct gcc_debug_hooks *
dump_go_spec_init(char const*, const struct gcc_debug_hooks*)
{ SDCPP_DUMMY_FCT();
}
bool dwarf2out_default_as_loc_support()
{
	return false;
}
bool dwarf2out_default_as_locview_support()
{
	return false;
}
void dwarf2out_do_cfi_asm()
{ SDCPP_DUMMY_FCT();
}
void emergency_dump_function()
{ untested();
}
void finalize_plugins()
{
}
void gcc::dump_manager::register_dumps()
{
}
tree get_identifier(char const*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
int ggc_mark_stringpool()
{ SDCPP_DUMMY_FCT();
	return 0;
}
int ggc_purge_stringpool()
{ SDCPP_DUMMY_FCT();
	return 0;
}
void gt_clear_caches()
{ SDCPP_DUMMY_FCT();
}
void gt_ggc_m_S(void const*)
{ SDCPP_DUMMY_FCT();
}
void gt_pch_note_reorder (void*, void*, gt_handle_reorder)
{ SDCPP_DUMMY_FCT();
}
void gt_pch_p_S(void*, void*, void (*)(void*, void*, void*), void*)
{ SDCPP_DUMMY_FCT();
}
int gt_pch_restore_stringpool()
{ SDCPP_DUMMY_FCT();
	return 0;
}
int gt_pch_save_stringpool()
{ SDCPP_DUMMY_FCT();
	return 0;
}
int hook_int_const_tree_int(tree_node const*, int)
{ SDCPP_DUMMY_FCT();
	return 0;
}
void init_stringpool()
{
}
void initialize_plugins()
{
}
bool lang_GNU_C()
{
	return true;
}
void lhd_append_data(void const*, size_t, void*)
{ SDCPP_DUMMY_FCT();
}
void lhd_begin_section(char const*)
{ SDCPP_DUMMY_FCT();
}
bool lhd_decl_ok_for_sibcall(tree_node const*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
const char* lhd_decl_printable_name(tree_node*, int)
{ SDCPP_DUMMY_FCT();
	return 0;
}
void lhd_do_nothing()
{ untested();
}
void lhd_do_nothing_t(tree_node*)
{ SDCPP_DUMMY_FCT();
}
const char* lhd_dwarf_name(tree_node*, int)
{ SDCPP_DUMMY_FCT();
	return 0;
}
void lhd_end_section()
{ SDCPP_DUMMY_FCT();
}
const char* lhd_get_substring_location(substring_loc const&, unsigned int*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
void lhd_overwrite_decl_assembler_name(tree_node*, tree_node*)
{ SDCPP_DUMMY_FCT();
}
void lhd_print_error_function(diagnostic_context*, char const*, diagnostic_info*)
{ untested();
}
void lhd_print_tree_nothing(FILE*, tree_node*, int)
{ SDCPP_DUMMY_FCT();
}
void lhd_set_decl_assembler_name(tree_node*)
{ SDCPP_DUMMY_FCT();
}
int lhd_tree_dump_type_quals(tree_node const*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
size_t lhd_tree_size(tree_code)
{ SDCPP_DUMMY_FCT();
	return 0;
}
int lhd_type_dwarf_attribute(tree_node const*, int)
{ SDCPP_DUMMY_FCT();
	return 0;
}
bool names_builtin_p(char const*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
void output_operand_lossage (const char *, ...)
{ SDCPP_DUMMY_FCT();
}
void parse_basever(int*, int*, int*)
{ SDCPP_DUMMY_FCT();
}
void pch_cpp_save_state()
{
}
void pch_init()
{ SDCPP_DUMMY_FCT();
}
void pop_file_scope()
{ SDCPP_DUMMY_FCT();
}
void print_plugins_help(FILE*, char const*)
{
	// no-op
}
void push_file_scope()
{ SDCPP_DUMMY_FCT();
}
tree pushdecl(tree_node*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
void tree_diagnostics_defaults(diagnostic_context*)
{
}
tree lhd_enum_underlying_base_type(tree_node const*)
{ SDCPP_DUMMY_FCT();
	return tree();
}
tree lhd_make_node(tree_code)
{ SDCPP_DUMMY_FCT();
	return tree();
}
tree* lhd_omp_get_decl_init(tree_node*)
{ SDCPP_DUMMY_FCT();
	return 0;
}
tree lhd_pass_through_t(tree_node*)
{ SDCPP_DUMMY_FCT();
	return tree();
}
void lhd_register_dumps(gcc::dump_manager*)
{ untested();
}
tree lhd_return_null_const_tree(tree_node const*)
{ SDCPP_DUMMY_FCT();
	return tree();
}
tree lhd_unit_size_without_reusable_padding(tree_node*)
{ SDCPP_DUMMY_FCT();
	return tree();
}
void statistics_early_init()
{
}
void virt_loc_aware_diagnostic_finalizer(diagnostic_context*, diagnostic_info*)
{ untested();
}
void warn_if_plugins()
{ untested();
}
/*----------------------------------------------------------------------*/
namespace gcc{
pass_manager::~pass_manager ()
{ SDCPP_DUMMY_FCT();
}
pass_manager::pass_manager (context*)
{ SDCPP_DUMMY_FCT();
}
dump_manager::~dump_manager()
{ SDCPP_DUMMY_FCT();
}
dump_manager::dump_manager()
{
}
}
/*----------------------------------------------------------------------*/
bool after_memory_report;
FILE *dump_file = NULL;
extern const struct attribute_spec c_common_format_attribute_table[] =
{
  { "dummy",                 3, 3, false, true,  true, false,
			      NULL, NULL } };
extern const struct attribute_spec c_common_attribute_table[] = {
	{ "dummy",  1, 1, false, true, false, true,
               NULL, NULL } };
struct ht *ident_hash;
/*----------------------------------------------------------------------*/
ggc_root_tab my_ggc_root_tab;
const struct ggc_root_tab * const gt_ggc_deletable_rtab[] = { &my_ggc_root_tab };
const struct ggc_root_tab * const gt_ggc_rtab[] = { &my_ggc_root_tab };
const struct ggc_root_tab * const gt_pch_scalar_rtab[] = { &my_ggc_root_tab };
/*----------------------------------------------------------------------*/
bool this_is_asm_operands = 0;
/*----------------------------------------------------------------------*/