diff options
author | Jason Merrill <jason@redhat.com> | 2002-07-26 16:10:43 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2002-07-26 16:10:43 -0400 |
commit | 8e51619a4c4f724a8ced224d4c4d5116d59a5b97 (patch) | |
tree | 9feb5c92f6ca92e0e155d86992b0be0d7a2f82a6 /gcc/function.c | |
parent | 8a7f132d3dc5c2c543b5f9fb7fa098b0208c6474 (diff) | |
download | gcc-8e51619a4c4f724a8ced224d4c4d5116d59a5b97.zip gcc-8e51619a4c4f724a8ced224d4c4d5116d59a5b97.tar.gz gcc-8e51619a4c4f724a8ced224d4c4d5116d59a5b97.tar.bz2 |
function.c (assign_parms): Handle frontend-directed pass by invisible reference.
* function.c (assign_parms): Handle frontend-directed pass by
invisible reference.
cp/
* call.c (build_over_call): Likewise.
(cp_convert_parm_for_inlining): New fn.
(convert_for_arg_passing): New fn.
(convert_default_arg, build_over_call): Use it.
(type_passed_as): New fn.
* pt.c (tsubst_decl): Use it.
* decl2.c (cp_build_parm_decl): New fn.
(build_artificial_parm): Use it.
(start_static_storage_duration_function): Likewise.
* decl.c (start_cleanup_fn, grokdeclarater): Likewise.
(grokparms): Don't mess with DECL_ARG_TYPE.
* typeck.c (convert_arguments): Use convert_for_arg_passing.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
Define.
* cp-tree.h: Declare new fns.
From-SVN: r55781
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c index 2a59d59..98c1965 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4425,6 +4425,15 @@ assign_parms (fndecl) passed_pointer = 1; passed_mode = nominal_mode = Pmode; } + /* See if the frontend wants to pass this by invisible reference. */ + else if (passed_type != nominal_type + && POINTER_TYPE_P (passed_type) + && TREE_TYPE (passed_type) == nominal_type) + { + nominal_type = passed_type; + passed_pointer = 1; + passed_mode = nominal_mode = Pmode; + } promoted_mode = passed_mode; |