aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-04-22 17:35:08 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-04-22 17:35:08 +0000
commit7d7fcb08c3e4f48c061a1987ec2445a11560c4e6 (patch)
tree3835a433d75a82dc790e95c7b83470ce5a833abe /gcc/ada/gcc-interface/trans.c
parent1b5f5069484e7b96a0e7f07db7cd014f61af0b4d (diff)
downloadgcc-7d7fcb08c3e4f48c061a1987ec2445a11560c4e6.zip
gcc-7d7fcb08c3e4f48c061a1987ec2445a11560c4e6.tar.gz
gcc-7d7fcb08c3e4f48c061a1987ec2445a11560c4e6.tar.bz2
gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG parameter.
* gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG parameter. * gcc-interface/utils.c (create_subprog_decl): Likewise. Set DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl. <all>: Do not set flags on the reused DECL node coming from an alias. Set DECL_IGNORED_P on the DECL node built for subprograms if they don't need debug info here... * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here. (gigi): Adjust calls to create_subprog_decl. (build_raise_check): Likewise. (establish_gnat_vms_condition_handler): Likewise. (Compilation_Unit_to_gnu): Likewise. (gnat_to_gnu): Likewise. From-SVN: r172862
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r--gcc/ada/gcc-interface/trans.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 378f88c..b4094ca0 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -357,7 +357,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
build_function_type (ptr_void_type_node,
tree_cons (NULL_TREE,
sizetype, t)),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
DECL_IS_MALLOC (malloc_decl) = 1;
/* malloc32 is a function declaration tree for a function to allocate
@@ -367,7 +367,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
build_function_type (ptr_void_type_node,
tree_cons (NULL_TREE,
sizetype, t)),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
DECL_IS_MALLOC (malloc32_decl) = 1;
/* free is a function declaration tree for a function to free memory. */
@@ -377,14 +377,14 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
tree_cons (NULL_TREE,
ptr_void_type_node,
t)),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
/* This is used for 64-bit multiplication with overflow checking. */
mulv64_decl
= create_subprog_decl (get_identifier ("__gnat_mulv64"), NULL_TREE,
build_function_type_list (int64_type, int64_type,
int64_type, NULL_TREE),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
/* Name of the _Parent field in tagged record types. */
parent_name_id = get_identifier (Get_Name_String (Name_uParent));
@@ -405,7 +405,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
= create_subprog_decl
(get_identifier ("system__soft_links__get_jmpbuf_address_soft"),
NULL_TREE, build_function_type (jmpbuf_ptr_type, NULL_TREE),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
DECL_IGNORED_P (get_jmpbuf_decl) = 1;
set_jmpbuf_decl
@@ -414,7 +414,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
NULL_TREE,
build_function_type (void_type_node,
tree_cons (NULL_TREE, jmpbuf_ptr_type, t)),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
DECL_IGNORED_P (set_jmpbuf_decl) = 1;
/* setjmp returns an integer and has one operand, which is a pointer to
@@ -424,7 +424,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
(get_identifier ("__builtin_setjmp"), NULL_TREE,
build_function_type (integer_type_node,
tree_cons (NULL_TREE, jmpbuf_ptr_type, t)),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
DECL_BUILT_IN_CLASS (setjmp_decl) = BUILT_IN_NORMAL;
DECL_FUNCTION_CODE (setjmp_decl) = BUILT_IN_SETJMP;
@@ -435,7 +435,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
(get_identifier ("__builtin_update_setjmp_buf"), NULL_TREE,
build_function_type (void_type_node,
tree_cons (NULL_TREE, jmpbuf_ptr_type, t)),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
DECL_BUILT_IN_CLASS (update_setjmp_buf_decl) = BUILT_IN_NORMAL;
DECL_FUNCTION_CODE (update_setjmp_buf_decl) = BUILT_IN_UPDATE_SETJMP_BUF;
@@ -446,7 +446,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
tree_cons (NULL_TREE,
ptr_void_type_node,
t)),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
DECL_IGNORED_P (begin_handler_decl) = 1;
end_handler_decl
@@ -455,7 +455,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
tree_cons (NULL_TREE,
ptr_void_type_node,
t)),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
DECL_IGNORED_P (end_handler_decl) = 1;
/* If in no exception handlers mode, all raise statements are redirected to
@@ -473,7 +473,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
tree_cons (NULL_TREE,
integer_type_node,
t))),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
TREE_THIS_VOLATILE (decl) = 1;
TREE_SIDE_EFFECTS (decl) = 1;
TREE_TYPE (decl)
@@ -506,7 +506,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
(get_identifier ("system__soft_links__get_gnat_exception"),
NULL_TREE,
build_function_type (build_pointer_type (except_type_node), NULL_TREE),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
raise_nodefer_decl
= create_subprog_decl
@@ -515,7 +515,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
tree_cons (NULL_TREE,
build_pointer_type (except_type_node),
t)),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
/* Indicate that these never return. */
TREE_THIS_VOLATILE (raise_nodefer_decl) = 1;
@@ -665,7 +665,7 @@ build_raise_check (int check, tree void_tree, enum exception_info_kind kind)
tree_cons (NULL_TREE,
integer_type_node,
void_tree)))))),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
}
else
{
@@ -678,7 +678,7 @@ build_raise_check (int check, tree void_tree, enum exception_info_kind kind)
tree_cons
(NULL_TREE, build_pointer_type (unsigned_char_type_node),
tree_cons (NULL_TREE, integer_type_node, void_tree))),
- NULL_TREE, false, true, true, NULL, Empty);
+ NULL_TREE, false, true, true, true, NULL, Empty);
}
TREE_THIS_VOLATILE (result) = 1;
@@ -2427,7 +2427,8 @@ establish_gnat_vms_condition_handler (void)
ptr_void_type_node,
ptr_void_type_node,
NULL_TREE),
- NULL_TREE, 0, 1, 1, 0, Empty);
+ NULL_TREE, false, true, true, true, NULL,
+ Empty);
/* ??? DECL_CONTEXT shouldn't have been set because of DECL_EXTERNAL. */
DECL_CONTEXT (gnat_vms_condition_handler_decl) = NULL_TREE;
@@ -2508,10 +2509,6 @@ Subprogram_Body_to_gnu (Node_Id gnat_node)
relayout_decl (gnu_result_decl);
}
- /* Propagate the debug mode. */
- if (!Needs_Debug_Info (gnat_subprog_id))
- DECL_IGNORED_P (gnu_subprog_decl) = 1;
-
/* Set the line number in the decl to correspond to that of the body so that
the line number notes are written correctly. */
Sloc_to_locus (Sloc (gnat_node), &DECL_SOURCE_LOCATION (gnu_subprog_decl));
@@ -3774,7 +3771,8 @@ Compilation_Unit_to_gnu (Node_Id gnat_node)
tree gnu_elab_proc_decl
= create_subprog_decl
(create_concat_name (gnat_unit_entity, body_p ? "elabb" : "elabs"),
- NULL_TREE, void_ftype, NULL_TREE, false, true, false, NULL, gnat_unit);
+ NULL_TREE, void_ftype, NULL_TREE, false, true, false, true, NULL,
+ gnat_unit);
struct elab_info *info;
VEC_safe_push (tree, gc, gnu_elab_proc_stack, gnu_elab_proc_decl);
@@ -4505,7 +4503,7 @@ gnat_to_gnu (Node_Id gnat_node)
(Entity (Prefix (gnat_node)),
attr == Attr_Elab_Body ? "elabb" : "elabs"),
NULL_TREE, void_ftype, NULL_TREE, false,
- true, true, NULL, gnat_node);
+ true, true, true, NULL, gnat_node);
gnu_result = Attribute_to_gnu (gnat_node, &gnu_result_type, attr);
}