aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 4321b8a..253c1e6 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2093,48 +2093,6 @@ cp_auto_var_in_fn_p (tree var, tree fn)
&& nonstatic_local_decl_p (var));
}
-/* Tell whether a declaration is needed for the RESULT of a function
- FN being inlined into CALLER or if the top node of target_exprs is
- to be used. */
-
-tree
-cp_copy_res_decl_for_inlining (tree result,
- tree fn,
- tree caller,
- void* decl_map_ ATTRIBUTE_UNUSED,
- int* need_decl,
- tree return_slot_addr)
-{
- tree var;
-
- /* If FN returns an aggregate then the caller will always pass the
- address of the return slot explicitly. If we were just to
- create a new VAR_DECL here, then the result of this function
- would be copied (bitwise) into the variable initialized by the
- TARGET_EXPR. That's incorrect, so we must transform any
- references to the RESULT into references to the target. */
-
- /* We should have an explicit return slot iff the return type is
- TREE_ADDRESSABLE. See gimplify_aggr_init_expr. */
- if (TREE_ADDRESSABLE (TREE_TYPE (result))
- != (return_slot_addr != NULL_TREE))
- abort ();
-
- *need_decl = !return_slot_addr;
- if (return_slot_addr)
- {
- var = build_indirect_ref (return_slot_addr, "");
- if (! same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (var),
- TREE_TYPE (result)))
- abort ();
- }
- /* Otherwise, make an appropriate copy. */
- else
- var = copy_decl_for_inlining (result, fn, caller);
-
- return var;
-}
-
/* FN body has been duplicated. Update language specific fields. */
void