diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-03 08:09:15 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-03 08:09:15 +0000 |
commit | 693dfc0f8696e7c8a34f4ad2577cc3a8291cdaf2 (patch) | |
tree | 1e26bac305aa6ddd203a993b2ebc5701dbc88809 /gcc/ada/exp_ch6.ads | |
parent | b8a17a214207d0c6f7d0657204b060b8f8179bf8 (diff) | |
download | ppe42-gcc-693dfc0f8696e7c8a34f4ad2577cc3a8291cdaf2.tar.gz ppe42-gcc-693dfc0f8696e7c8a34f4ad2577cc3a8291cdaf2.zip |
2012-10-03 Javier Miranda <miranda@adacore.com>
* exp_ch4.adb (Expand_N_Allocator_Expression): Minor code
reorganization and cleanup. Done to ensure proper management of
the C++ constructor covering tagged and untagged types and also
non-default constructors.
* exp_ch6.ads, exp_ch6.adb (Make_CPP_Constructor_Call_In_Allocator):
New subprogram.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192028 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch6.ads')
-rw-r--r-- | gcc/ada/exp_ch6.ads | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch6.ads b/gcc/ada/exp_ch6.ads index 42ba07d20c2..0f65a5bf786 100644 --- a/gcc/ada/exp_ch6.ads +++ b/gcc/ada/exp_ch6.ads @@ -205,6 +205,16 @@ package Exp_Ch6 is -- for which Is_Build_In_Place_Call is True, or an N_Qualified_Expression -- node applied to such a function call. + procedure Make_CPP_Constructor_Call_In_Allocator + (Allocator : Node_Id; + Function_Call : Node_Id); + -- Handle a call to a CPP constructor that occurs as the expression that + -- initializes an allocator, by passing access to the allocated object as + -- an additional parameter of the constructor call. A new access object is + -- declared that is initialized to the result of the allocator, passed to + -- the constructor, and the allocator is rewritten to refer to that access + -- object. Function_Call must denote a call to a CPP_Constructor function. + function Needs_BIP_Alloc_Form (Func_Id : Entity_Id) return Boolean; -- Ada 2005 (AI-318-02): Return True if the function needs an implicit -- BIP_Alloc_Form parameter (see type BIP_Formal_Kind). |