diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-01 08:17:20 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-01 08:17:20 +0000 |
commit | 9c9276388080f1b29ee3a89fdfbdada45c28fa92 (patch) | |
tree | f67b75102f9fc406e9089148d3ba4caef87238c7 /gcc/ada/inline.adb | |
parent | 076058a3211913809003dca94568254700264fc9 (diff) | |
download | gcc-9c9276388080f1b29ee3a89fdfbdada45c28fa92.tar.gz |
2014-08-01 Robert Dewar <dewar@adacore.com>
* gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
osint.adb, krunch.adb: Minor reformatting.
2014-08-01 Robert Dewar <dewar@adacore.com>
* inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
Remove VMS-specific code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213414 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r-- | gcc/ada/inline.adb | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index a2d41b22005..b133cc4100d 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -165,10 +165,10 @@ package body Inline is function Has_Single_Return (N : Node_Id) return Boolean; -- In general we cannot inline functions that return unconstrained type. - -- However, we can handle such functions if all return statements return - -- a local variable that is the only declaration in the body of the - -- function. In that case the call can be replaced by that local - -- variable as is done for other inlined calls. + -- However, we can handle such functions if all return statements return a + -- local variable that is the only declaration in the body of the function. + -- In that case the call can be replaced by that local variable as is done + -- for other inlined calls. function In_Main_Unit_Or_Subunit (E : Entity_Id) return Boolean; -- Return True if E is in the main unit or its spec or in a subunit @@ -429,7 +429,7 @@ package body Inline is procedure Register_Backend_Not_Inlined_Subprogram (Subp : Entity_Id); -- Append Subp to the list of subprograms that cannot be inlined by - -- the backend + -- the backend. ---------------------------- -- Back_End_Cannot_Inline -- @@ -3332,7 +3332,7 @@ package body Inline is -- expanded into a procedure call which must be added after the -- object declaration. - if Is_Unc_Decl and then Back_End_Inlining then + if Is_Unc_Decl and Back_End_Inlining then Insert_Action_After (Parent (N), Blk); else Set_Expression (Parent (N), Empty); @@ -4329,9 +4329,9 @@ package body Inline is return False; end Has_Initialized_Type; - ------------------------ - -- Has_Single_Return -- - ------------------------ + ----------------------- + -- Has_Single_Return -- + ----------------------- function Has_Single_Return (N : Node_Id) return Boolean is Return_Statement : Node_Id := Empty; @@ -4376,8 +4376,8 @@ package body Inline is return Abandon; end if; - -- We can only inline a build-in-place function if - -- it has a single extended return. + -- We can only inline a build-in-place function if it has a single + -- extended return. elsif Nkind (N) = N_Extended_Return_Statement then if No (Return_Statement) then @@ -4572,6 +4572,8 @@ package body Inline is -- Number_Of_Statements -- -------------------------- + -- Why not List_Length??? + function Number_Of_Statements (Stats : List_Id) return Natural is Stat_Count : Integer := 0; Stmt : Node_Id; |