aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/inline.adb
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2017-09-06 12:01:13 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2017-09-06 14:01:13 +0200
commit643827e99051c3ce6077d8bb332290741dc90571 (patch)
treee52a39b62571b39e7f56f1931e9f955031101a42 /gcc/ada/inline.adb
parent66f95f60458a1da2e82c4b879357ebe36fcdb879 (diff)
downloadgcc-643827e99051c3ce6077d8bb332290741dc90571.zip
gcc-643827e99051c3ce6077d8bb332290741dc90571.tar.gz
gcc-643827e99051c3ce6077d8bb332290741dc90571.tar.bz2
exp_util.adb (Side_Effect_Free): For CodePeer (only) treat uses of 'Image and related attributes as having side...
2017-09-06 Steve Baird <baird@adacore.com> * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat uses of 'Image and related attributes as having side effects in order to avoid replicating such uses. * pprint.ads (Expression_Image) Add new generic formal flag Hide_Temp_Derefs. The flag defaults to False; CodePeer will (eventually) override the default. * pprint.adb (Expression_Image) If the new flag is set, then suppress the ".all" suffix when displaying a dereference whose prefix is a use of a value-capturing compiler temp of the sort generated by Expr_Util.Remove_Side_Effects . * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb, sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb: Minor reformatting. * inline.adb: Minor wording change. From-SVN: r251784
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r--gcc/ada/inline.adb15
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 15efcef..70d1f848 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -1607,7 +1607,6 @@ package body Inline is
--------------------------
procedure Build_Body_To_Inline (N : Node_Id; Spec_Id : Entity_Id) is
-
procedure Generate_Subprogram_Body
(N : Node_Id;
Body_To_Inline : out Node_Id);
@@ -1683,11 +1682,10 @@ package body Inline is
Save_Env (Scope (Current_Scope), Scope (Current_Scope));
end if;
- -- We need to capture references to the formals in order
- -- to substitute the actuals at the point of inlining, i.e.
- -- instantiation. To treat the formals as globals to the body to
- -- inline, we nest it within a dummy parameterless subprogram,
- -- declared within the real one.
+ -- Capture references to formals in order to substitute the actuals
+ -- at the point of inlining or instantiation. To treat the formals
+ -- as globals to the body to inline, nest the body within a dummy
+ -- parameterless subprogram, declared within the real one.
Generate_Subprogram_Body (N, Original_Body);
Body_To_Analyze := Copy_Generic_Node (Original_Body, Empty, False);
@@ -1730,8 +1728,7 @@ package body Inline is
-- Can_Split_Unconstrained_Function --
--------------------------------------
- function Can_Split_Unconstrained_Function (N : Node_Id) return Boolean
- is
+ function Can_Split_Unconstrained_Function (N : Node_Id) return Boolean is
Ret_Node : constant Node_Id :=
First (Statements (Handled_Statement_Sequence (N)));
D : Node_Id;
@@ -2925,7 +2922,7 @@ package body Inline is
-- The semantic analyzer checked that frontend-inlined functions
-- returning unconstrained types have no declarations and have
-- a single extended return statement. As part of its processing
- -- the function was split in two subprograms: a procedure P' and
+ -- the function was split into two subprograms: a procedure P' and
-- a function F' that has a block with a call to procedure P' (see
-- Split_Unconstrained_Function).