X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ast_t.h;h=e05e63350900253a3da37d4931422ef08635a7da;hb=ebb77232f9baed801f3a073741ff7a023acea485;hp=2e389c01d8cafbe616e796cb7d3f63dab9690205;hpb=2beaa4f65961fe297663e1cec9e5632b7f3e1cba;p=cparser diff --git a/ast_t.h b/ast_t.h index 2e389c0..e05e633 100644 --- a/ast_t.h +++ b/ast_t.h @@ -29,7 +29,6 @@ #include "type.h" #include "entity_t.h" #include "adt/obst.h" -#include "target_value.h" /** The AST obstack contains all data that must stay in the AST. */ extern struct obstack ast_obstack; @@ -266,7 +265,7 @@ struct literal_expression_t { symbol_t *suffix; /* ast2firm data */ - tarval *target_value; + ir_tarval *target_value; }; struct string_literal_expression_t { @@ -668,11 +667,6 @@ struct translation_unit_t { statement_t *global_asm; }; -static inline void *_allocate_ast(size_t size) -{ - return obstack_alloc(&ast_obstack, size); -} - static inline bool is_invalid_expression(expression_t *expression) { return expression->base.kind == EXPR_INVALID; @@ -683,17 +677,18 @@ static inline bool is_invalid_statement(statement_t *statement) return statement->base.kind == STATEMENT_INVALID; } -#define allocate_ast(size) _allocate_ast(size) - /** * Allocate an AST node with given size and * initialize all fields with zero. */ static inline void *allocate_ast_zero(size_t size) { - void *res = allocate_ast(size); - memset(res, 0, size); - return res; + return memset(obstack_alloc(&ast_obstack, size), 0, size); } +/** If set, implicit casts are printed. */ +extern bool print_implicit_casts; +/** If set parenthesis are printed to indicate operator precedence. */ +extern bool print_parenthesis; + #endif