diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2022-08-12 11:51:30 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-11-07 09:36:31 +0100 |
commit | 76b35e7227f34e2ce18e50ca637c86d7a1c3ef49 (patch) | |
tree | c03aca26fa02d18be4c547bf42868dc56e34e5de | |
parent | 748976cfc867cb387f0f8180c48233e883223f93 (diff) | |
download | gcc-76b35e7227f34e2ce18e50ca637c86d7a1c3ef49.zip gcc-76b35e7227f34e2ce18e50ca637c86d7a1c3ef49.tar.gz gcc-76b35e7227f34e2ce18e50ca637c86d7a1c3ef49.tar.bz2 |
ada: Cleanup comment about mapping parameters when inlining
Improve location of the comment about a special case for GNATprove mode.
gcc/ada/
* inline.adb (Establish_Actual_Mapping_For_Inlined_Call): Move
comment next to a condition that it describes.
-rw-r--r-- | gcc/ada/inline.adb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index e3f35da..a1ead98 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -3013,14 +3013,10 @@ package body Inline is Temp_Typ := Etype (A); end if; - -- If the actual is a simple name or a literal, no need to - -- create a temporary, object can be used directly. - - -- If the actual is a literal and the formal has its address taken, - -- we cannot pass the literal itself as an argument, so its value - -- must be captured in a temporary. Skip this optimization in - -- GNATprove mode, to make sure any check on a type conversion - -- will be issued. + -- If the actual is a simple name or a literal, no need to create a + -- temporary, object can be used directly. Skip this optimization in + -- GNATprove mode, to make sure any check on a type conversion will + -- be issued. if (Is_Entity_Name (A) and then @@ -3039,6 +3035,10 @@ package body Inline is and then Formal_Is_Used_Once (F) and then not GNATprove_Mode) + -- If the actual is a literal and the formal has its address taken, + -- we cannot pass the literal itself as an argument, so its value + -- must be captured in a temporary. + or else (Nkind (A) in N_Real_Literal | N_Integer_Literal | N_Character_Literal |