diff options
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index a6171b2..fe91cf3 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -75,10 +75,19 @@ extern void set_block_for_group (tree); Get SLOC from GNAT_ENTITY. */ extern void add_decl_expr (tree gnu_decl, Entity_Id gnat_entity); -/* Mark nodes rooted at *TP with TREE_VISITED and types as having their +/* Mark nodes rooted at T with TREE_VISITED and types as having their sized gimplified. We use this to indicate all variable sizes and positions in global types may not be shared by any subprogram. */ -extern void mark_visited (tree *tp); +extern void mark_visited (tree t); + +/* This macro calls the above function but short-circuits the common + case of a constant to save time and also checks for NULL. */ + +#define MARK_VISITED(EXP) \ +do { \ + if((EXP) && !TREE_CONSTANT (EXP)) \ + mark_visited (EXP); \ +} while (0) /* Finalize any From_With_Type incomplete types. We do this after processing our compilation unit and after processing its spec, if this is a body. */ @@ -767,20 +776,6 @@ extern bool is_double_scalar_or_array (Entity_Id gnat_type, component of an aggregate type. */ extern bool type_for_nonaliased_component_p (tree gnu_type); -/* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical - operation. - - This preparation consists of taking the ordinary - representation of an expression EXPR and producing a valid tree - boolean expression describing whether EXPR is nonzero. We could - simply always do build_binary_op (NE_EXPR, expr, integer_zero_node, 1), - but we optimize comparisons, &&, ||, and !. - - The resulting type should always be the same as the input type. - This function is simpler than the corresponding C version since - the only possible operands will be things of Boolean type. */ -extern tree gnat_truthvalue_conversion (tree expr); - /* Return the base type of TYPE. */ extern tree get_base_type (tree type); |