aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/ada-tree.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-04-22 08:34:09 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-04-22 08:34:09 +0000
commitfeec4372c1d33b1d7de0442d9d6308c2b96255ca (patch)
treebc368177858013d50041be20988e8673b42cffe4 /gcc/ada/gcc-interface/ada-tree.h
parent7d83f4f5362bb17aa3b53db60bed6dbb5cd38e73 (diff)
downloadgcc-feec4372c1d33b1d7de0442d9d6308c2b96255ca.zip
gcc-feec4372c1d33b1d7de0442d9d6308c2b96255ca.tar.gz
gcc-feec4372c1d33b1d7de0442d9d6308c2b96255ca.tar.bz2
ada-tree.def: Fix formatting nits.
* gcc-interface/ada-tree.def: Fix formatting nits. (REGION_STMT): Delete. (HANDLER_STMT): Likewise. * gcc-interface/ada-tree.h: Fix formatting nits. (IS_STMT): Delete. (REGION_STMT_BODY): Likewise. (REGION_STMT_HANDLE): Likewise. (REGION_STMT_BLOCK): Likewise. (HANDLER_STMT_ARG): Likewise. (HANDLER_STMT_LIST): Likewise. (HANDLER_STMT_BLOCK): Likewise. * gcc-interface/gigi.h (fp_prec_to_size): Update comment. (fp_size_to_prec): Likewise. (largest_move_alignment): Delete. (gnat_compute_largest_alignment): Likewise. Fix minor nits. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>: Remove redundant code. <E_Array_Type>: Remove redundant assert. <E_Array_Subtype>: Exit early from index computation in pathological cases. Rewrite conditional assignment. (make_type_from_size): Likewise. * gcc-interface/misc.c (largest_move_alignment): Delete. (gnat_finish_incomplete_decl): Likewise. (LANG_HOOKS_FINISH_INCOMPLETE_DECL): Likewise. (asm_out_file): Likewise (gnat_print_type) <INTEGER_TYPE>: Fall through to ENUMERAL_TYPE case. (gnat_dwarf_name): Move around. * gcc-interface/trans.c (Attribute_to_gnu): Fix minor nits. (gigi): Remove call to gnat_compute_largest_alignment. * utils.c (create_field_decl): Rewrite conditional assignment. Fix minor nits. From-SVN: r146551
Diffstat (limited to 'gcc/ada/gcc-interface/ada-tree.h')
-rw-r--r--gcc/ada/gcc-interface/ada-tree.h69
1 files changed, 30 insertions, 39 deletions
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h
index 8d1f6a8..cd2b970 100644
--- a/gcc/ada/gcc-interface/ada-tree.h
+++ b/gcc/ada/gcc-interface/ada-tree.h
@@ -30,8 +30,8 @@ union lang_tree_node
{
union tree_node GTY((tag ("0"))) t;
};
-struct lang_decl GTY(()) {tree t; };
-struct lang_type GTY(()) {tree t; };
+struct lang_decl GTY(()) { tree t; };
+struct lang_type GTY(()) { tree t; };
/* Define macros to get and set the tree in TYPE_ and DECL_LANG_SPECIFIC. */
#define GET_TYPE_LANG_SPECIFIC(NODE) \
@@ -39,7 +39,7 @@ struct lang_type GTY(()) {tree t; };
#define SET_TYPE_LANG_SPECIFIC(NODE, X) \
(TYPE_LANG_SPECIFIC (NODE) \
= (TYPE_LANG_SPECIFIC (NODE) \
- ? TYPE_LANG_SPECIFIC (NODE) : GGC_NEW (struct lang_type))) \
+ ? TYPE_LANG_SPECIFIC (NODE) : GGC_NEW (struct lang_type))) \
->t = X;
#define GET_DECL_LANG_SPECIFIC(NODE) \
@@ -47,7 +47,7 @@ struct lang_type GTY(()) {tree t; };
#define SET_DECL_LANG_SPECIFIC(NODE, VALUE) \
(DECL_LANG_SPECIFIC (NODE) \
= (DECL_LANG_SPECIFIC (NODE) \
- ? DECL_LANG_SPECIFIC (NODE) : GGC_NEW (struct lang_decl))) \
+ ? DECL_LANG_SPECIFIC (NODE) : GGC_NEW (struct lang_decl))) \
->t = VALUE;
/* Flags added to GCC type nodes. */
@@ -57,7 +57,7 @@ struct lang_type GTY(()) {tree t; };
#define TYPE_IS_FAT_POINTER_P(NODE) \
TYPE_LANG_FLAG_0 (RECORD_OR_UNION_CHECK (NODE))
-#define TYPE_FAT_POINTER_P(NODE) \
+#define TYPE_FAT_POINTER_P(NODE) \
(TREE_CODE (NODE) == RECORD_TYPE && TYPE_IS_FAT_POINTER_P (NODE))
/* For integral types and array types, nonzero if this is a packed array type
@@ -75,7 +75,7 @@ struct lang_type GTY(()) {tree t; };
/* For ARRAY_TYPE, nonzero if this type corresponds to a dimension of
an Ada array other than the first. */
-#define TYPE_MULTI_ARRAY_P(NODE) TYPE_LANG_FLAG_1 (ARRAY_TYPE_CHECK (NODE))
+#define TYPE_MULTI_ARRAY_P(NODE) TYPE_LANG_FLAG_1 (ARRAY_TYPE_CHECK (NODE))
/* For FUNCTION_TYPE, nonzero if this denotes a function returning an
unconstrained array or record. */
@@ -102,7 +102,7 @@ struct lang_type GTY(()) {tree t; };
/* For INTEGER_TYPE, nonzero if this really represents a VAX
floating-point type. */
-#define TYPE_VAX_FLOATING_POINT_P(NODE) \
+#define TYPE_VAX_FLOATING_POINT_P(NODE) \
TYPE_LANG_FLAG_3 (INTEGER_TYPE_CHECK (NODE))
/* True if NODE is a thin pointer. */
@@ -154,22 +154,22 @@ struct lang_type GTY(()) {tree t; };
/* True if TYPE can alias any other types. */
#define TYPE_UNIVERSAL_ALIASING_P(NODE) TYPE_LANG_FLAG_6 (NODE)
-/* This field is only defined for FUNCTION_TYPE nodes. If the Ada
- subprogram contains no parameters passed by copy in/copy out then this
- field is 0. Otherwise it points to a list of nodes used to specify the
- return values of the out (or in out) parameters that qualify to be passed
- by copy in copy out. It is a CONSTRUCTOR. For a full description of the
- cico parameter passing mechanism refer to the routine gnat_to_gnu_entity. */
-#define TYPE_CI_CO_LIST(NODE) TYPE_LANG_SLOT_1 (FUNCTION_TYPE_CHECK (NODE))
+/* This field is only defined for FUNCTION_TYPE nodes. If the Ada subprogram
+ contains no parameters passed by copy in/copy out then this field is zero.
+ Otherwise it points to a list of nodes used to specify the return values
+ of the out (or in out) parameters that qualify to be passed by copy in/
+ copy out. For a full description of the copy in/copy out parameter passing
+ mechanism refer to the routine gnat_to_gnu_entity. */
+#define TYPE_CI_CO_LIST(NODE) TYPE_LANG_SLOT_1 (FUNCTION_TYPE_CHECK (NODE))
/* For integral types, this is the RM Size of the type. */
-#define TYPE_RM_SIZE(NODE) \
+#define TYPE_RM_SIZE(NODE) \
TYPE_LANG_SLOT_1 (TREE_CHECK3 (NODE, ENUMERAL_TYPE, BOOLEAN_TYPE, INTEGER_TYPE))
/* For an INTEGER_TYPE with TYPE_MODULAR_P, this is the value of the
modulus. */
#define TYPE_MODULUS(NODE) GET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))
-#define SET_TYPE_MODULUS(NODE, X) \
+#define SET_TYPE_MODULUS(NODE, X) \
SET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE), X)
/* For an INTEGER_TYPE that is the TYPE_DOMAIN of some ARRAY_TYPE, points to
@@ -183,21 +183,21 @@ struct lang_type GTY(()) {tree t; };
Digits_Value. */
#define TYPE_DIGITS_VALUE(NODE) \
GET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))
-#define SET_TYPE_DIGITS_VALUE(NODE, X) \
+#define SET_TYPE_DIGITS_VALUE(NODE, X) \
SET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE), X)
/* For a RECORD_TYPE that is a fat pointer, point to the type for the
unconstrained object. Likewise for a RECORD_TYPE that is pointed
to by a thin pointer. */
-#define TYPE_UNCONSTRAINED_ARRAY(NODE) \
+#define TYPE_UNCONSTRAINED_ARRAY(NODE) \
GET_TYPE_LANG_SPECIFIC (RECORD_TYPE_CHECK (NODE))
-#define SET_TYPE_UNCONSTRAINED_ARRAY(NODE, X) \
+#define SET_TYPE_UNCONSTRAINED_ARRAY(NODE, X) \
SET_TYPE_LANG_SPECIFIC (RECORD_TYPE_CHECK (NODE), X)
/* For other RECORD_TYPEs and all UNION_TYPEs and QUAL_UNION_TYPEs, the Ada
size of the object. This differs from the GCC size in that it does not
include any rounding up to the alignment of the type. */
-#define TYPE_ADA_SIZE(NODE) \
+#define TYPE_ADA_SIZE(NODE) \
GET_TYPE_LANG_SPECIFIC (RECORD_OR_UNION_CHECK (NODE))
#define SET_TYPE_ADA_SIZE(NODE, X) \
SET_TYPE_LANG_SPECIFIC (RECORD_OR_UNION_CHECK (NODE), X)
@@ -205,7 +205,7 @@ struct lang_type GTY(()) {tree t; };
/* For an INTEGER_TYPE with TYPE_HAS_ACTUAL_BOUNDS_P or an ARRAY_TYPE, this is
the index type that should be used when the actual bounds are required for
a template. This is used in the case of packed arrays. */
-#define TYPE_ACTUAL_BOUNDS(NODE) \
+#define TYPE_ACTUAL_BOUNDS(NODE) \
GET_TYPE_LANG_SPECIFIC (TREE_CHECK2 (NODE, INTEGER_TYPE, ARRAY_TYPE))
#define SET_TYPE_ACTUAL_BOUNDS(NODE, X) \
SET_TYPE_LANG_SPECIFIC (TREE_CHECK2 (NODE, INTEGER_TYPE, ARRAY_TYPE), X)
@@ -298,24 +298,15 @@ struct lang_type GTY(()) {tree t; };
discriminant number. */
#define DECL_DISCRIMINANT_NUMBER(NODE) DECL_INITIAL (FIELD_DECL_CHECK (NODE))
-/* Define fields and macros for statements.
+/* Define fields and macros for statements. */
+#define IS_ADA_STMT(NODE) \
+ (STATEMENT_CLASS_P (NODE) && TREE_CODE (NODE) >= STMT_STMT)
- Start by defining which tree codes are used for statements. */
-#define IS_STMT(NODE) (STATEMENT_CLASS_P (NODE))
-#define IS_ADA_STMT(NODE) (IS_STMT (NODE) \
- && TREE_CODE (NODE) >= STMT_STMT)
-
-#define STMT_STMT_STMT(NODE) TREE_OPERAND_CHECK_CODE (NODE, STMT_STMT, 0)
+#define STMT_STMT_STMT(NODE) TREE_OPERAND_CHECK_CODE (NODE, STMT_STMT, 0)
#define LOOP_STMT_TOP_COND(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 0)
#define LOOP_STMT_BOT_COND(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 1)
-#define LOOP_STMT_UPDATE(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 2)
-#define LOOP_STMT_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 3)
-#define LOOP_STMT_LABEL(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 4)
-#define EXIT_STMT_COND(NODE) TREE_OPERAND_CHECK_CODE (NODE, EXIT_STMT, 0)
-#define EXIT_STMT_LABEL(NODE) TREE_OPERAND_CHECK_CODE (NODE, EXIT_STMT, 1)
-#define REGION_STMT_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, REGION_STMT, 0)
-#define REGION_STMT_HANDLE(NODE) TREE_OPERAND_CHECK_CODE (NODE, REGION_STMT, 1)
-#define REGION_STMT_BLOCK(NODE) TREE_OPERAND_CHECK_CODE (NODE, REGION_STMT, 2)
-#define HANDLER_STMT_ARG(NODE) TREE_OPERAND_CHECK_CODE (NODE, HANDLER_STMT, 0)
-#define HANDLER_STMT_LIST(NODE) TREE_OPERAND_CHECK_CODE (NODE, HANDLER_STMT, 1)
-#define HANDLER_STMT_BLOCK(NODE) TREE_OPERAND_CHECK_CODE(NODE, HANDLER_STMT, 2)
+#define LOOP_STMT_UPDATE(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 2)
+#define LOOP_STMT_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 3)
+#define LOOP_STMT_LABEL(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 4)
+#define EXIT_STMT_COND(NODE) TREE_OPERAND_CHECK_CODE (NODE, EXIT_STMT, 0)
+#define EXIT_STMT_LABEL(NODE) TREE_OPERAND_CHECK_CODE (NODE, EXIT_STMT, 1)