diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-08-01 10:19:04 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-08-01 10:19:04 +0200 |
commit | cfb02ad18bf4064d5358fe9b4c3e9d07b373332c (patch) | |
tree | 8e7e212796d4641afaa9556f59d0e02b0395234a /gcc/ada/sem_ch12.ads | |
parent | 47ad7893fbf784f230dec09403f7862db6607198 (diff) | |
download | gcc-cfb02ad18bf4064d5358fe9b4c3e9d07b373332c.zip gcc-cfb02ad18bf4064d5358fe9b4c3e9d07b373332c.tar.gz gcc-cfb02ad18bf4064d5358fe9b4c3e9d07b373332c.tar.bz2 |
sem_ch12.ads (Need_Subprogram_Instance_Body): new function...
2008-08-01 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.ads (Need_Subprogram_Instance_Body): new function, to create
a pending instantiation for the body of a subprogram that is to be
inlined.
* sem_ch12.adb:
(Analyze_Subprogram_Instantiation): use Need_Subprogram_Instance_Body.
* sem_prag.adb (Make_Inline): If the pragma applies to an instance,
create a pending instance for its body, so that calls to the subprogram
can be inlined by the back-end.
From-SVN: r138480
Diffstat (limited to 'gcc/ada/sem_ch12.ads')
-rw-r--r-- | gcc/ada/sem_ch12.ads | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch12.ads b/gcc/ada/sem_ch12.ads index 7ebb2e8..c3b3417 100644 --- a/gcc/ada/sem_ch12.ads +++ b/gcc/ada/sem_ch12.ads @@ -106,6 +106,16 @@ package Sem_Ch12 is -- function and procedure instances. The flag Body_Optional has the -- same purpose as described for Instantiate_Package_Body. + function Need_Subprogram_Instance_Body + (N : Node_Id; + Subp : Entity_Id) return Boolean; + + -- If a subprogram instance is inlined, indicate that the body of it + -- must be created, to be used in inlined calls by the back-end. The + -- subprogram may be inlined because the generic itself carries the + -- pragma, or because a pragma appears for the instance in the scope. + -- of the instance. + procedure Save_Global_References (N : Node_Id); -- Traverse the original generic unit, and capture all references to -- entities that are defined outside of the generic in the analyzed |