df1b443c0224140bc67cabd0fd4af61dbc998fb6
[cparser] / ast2firm.h
1 /*
2  * This file is part of cparser.
3  * Copyright (C) 2012 Matthias Braun <matze@braunis.de>
4  */
5 #ifndef AST2FIRM_H
6 #define AST2FIRM_H
7
8 #include <libfirm/firm.h>
9 #include "ast.h"
10 #include "type.h"
11
12 void translation_unit_to_firm(translation_unit_t *unit);
13
14 void init_ast2firm(void);
15 void exit_ast2firm(void);
16
17 ir_type *get_ir_type(type_t *type);
18
19 typedef ident* (*create_ld_ident_func)(entity_t *entity);
20
21 void set_create_ld_ident(create_ld_ident_func func);
22
23 ir_tarval *fold_constant_to_tarval(const expression_t *expression);
24 void determine_enum_values(enum_type_t *type);
25
26 extern fp_model_t firm_fp_model;
27 extern ir_mode *atomic_modes[ATOMIC_TYPE_LAST+1];
28
29 #endif