diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2011-07-24 12:45:44 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-07-24 12:45:44 +0000 |
commit | f3d3457603f3d0566555fae58341e9f3137cfdb5 (patch) | |
tree | e8f8094e0aad34848de41c2150299cbb54051171 /gcc/ada/gcc-interface/utils2.c | |
parent | 40ecdf413f8cb8709da07361200bd75f651e6fc5 (diff) | |
download | gcc-f3d3457603f3d0566555fae58341e9f3137cfdb5.zip gcc-f3d3457603f3d0566555fae58341e9f3137cfdb5.tar.gz gcc-f3d3457603f3d0566555fae58341e9f3137cfdb5.tar.bz2 |
gigi.h (build_function_stub): Remove.
* gcc-interface/gigi.h (build_function_stub): Remove.
(build_return_expr): Likewise.
(convert_vms_descriptor): Declare.
* gcc-interface/utils.c (convert_vms_descriptor): Make global.
(build_function_stub): Move to...
* gcc-interface/utils2.c (build_return_expr): Move to...
* gcc-interface/trans.c (build_function_stub): ...here.
(build_return_expr): ...here.
(Subprogram_Body_to_gnu): Add local variable for language_function.
Disconnect the parameter attributes cache, if any, once done with it.
Call end_subprog_body only after setting the end_locus.
Build the stub associated with the function, if any, at the very end.
(gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
variables and streamline control flow.
From-SVN: r176712
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 44eb5cb..db89429 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -1407,43 +1407,6 @@ build_compound_expr (tree result_type, tree stmt_operand, tree expr_operand) return result; } -/* Similar, but for RETURN_EXPR. If RET_VAL is non-null, build a RETURN_EXPR - around the assignment of RET_VAL to RET_OBJ. Otherwise just build a bare - RETURN_EXPR around RESULT_OBJ, which may be null in this case. */ - -tree -build_return_expr (tree ret_obj, tree ret_val) -{ - tree result_expr; - - if (ret_val) - { - /* The gimplifier explicitly enforces the following invariant: - - RETURN_EXPR - | - MODIFY_EXPR - / \ - / \ - RET_OBJ ... - - As a consequence, type consistency dictates that we use the type - of the RET_OBJ as the operation type. */ - tree operation_type = TREE_TYPE (ret_obj); - - /* Convert the right operand to the operation type. Note that it's the - same transformation as in the MODIFY_EXPR case of build_binary_op, - with the assumption that the type cannot involve a placeholder. */ - if (operation_type != TREE_TYPE (ret_val)) - ret_val = convert (operation_type, ret_val); - - result_expr = build2 (MODIFY_EXPR, operation_type, ret_obj, ret_val); - } - else - result_expr = ret_obj; - - return build1 (RETURN_EXPR, void_type_node, result_expr); -} /* Build a CALL_EXPR to call FUNDECL with one argument, ARG. Return the CALL_EXPR. */ |