summaryrefslogtreecommitdiff
path: root/gcc/ada/inline.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-01 13:21:23 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-01 13:21:23 +0000
commit4e3af5dd458247067c94829f80074872a67d1ab2 (patch)
treef4b74c551490e0f742dfde5aa5c529016fd19b35 /gcc/ada/inline.adb
parent5198c5247024292180223a1ff398d4616e984098 (diff)
downloadgcc-4e3af5dd458247067c94829f80074872a67d1ab2.tar.gz
2011-09-01 Robert Dewar <dewar@adacore.com>
* prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting. 2011-09-01 Bob Duff <duff@adacore.com> * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance body" the same as "in inlined body", because visibility shouldn't apply there. 2011-09-01 Eric Botcazou <ebotcazou@adacore.com> * inline.adb (Add_Inlined_Body): Refine previous change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178412 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r--gcc/ada/inline.adb7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 53369eaf365..98bbbf09531 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -342,11 +342,12 @@ package body Inline is
null;
-- Do not inline the package if the subprogram is an init. proc
- -- because in that case the body appears in the same unit that
- -- declares the type, which will be compiled in any case.
+ -- or other internally generated subprogram, because in that
+ -- case the subprogram body appears in the same unit that
+ -- declares the type, and that body is visible to the back end.
elsif not Is_Inlined (Pack)
- and then not Is_Init_Proc (E)
+ and then Comes_From_Source (E)
then
Set_Is_Inlined (Pack);
Inlined_Bodies.Increment_Last;