aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/inline.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2020-05-27 06:10:35 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-15 09:42:40 -0400
commit8cd5951d68b98425beec4a632abcdc3c559074a4 (patch)
treeaf7d3ce514dc5102c4a9eb08613c871fb1337be0 /gcc/ada/inline.adb
parentfa02302bc17def4530df18fd5d77d0236cacb395 (diff)
downloadgcc-8cd5951d68b98425beec4a632abcdc3c559074a4.zip
gcc-8cd5951d68b98425beec4a632abcdc3c559074a4.tar.gz
gcc-8cd5951d68b98425beec4a632abcdc3c559074a4.tar.bz2
[Ada] Extend static functions
gcc/ada/ * inline.adb, inline.ads (Inline_Static_Expression_Function_Call): Renamed Inline_Static_Function_Call. * sem_ch13.adb (Analyze_Aspect_Static): Allow static intrinsic imported functions under -gnatX. * sem_util.ads, sem_util.adb (Is_Static_Expression_Function): Renamed Is_Static_Function. (Is_Static_Expression_Function_Call): Renamed Is_Static_Function_Call. * sem_ch6.adb, sem_elab.adb, sem_res.adb: Update calls to Is_Static_Function*. * sem_eval.adb (Fold_Dummy, Eval_Intrinsic_Call, Fold_Shift): New. (Eval_Call): Add support for intrinsic calls, code refactoring. (Eval_Entity_Name): Code refactoring. (Eval_Logical_Op): Update comment. (Eval_Shift): Call Fold_Shift. Update comments. * par-prag.adb (Par [Pragma_Extensions_Allowed]): Set Ada_Version to Ada_Version_Type'Last to handle Extensions_Allowed (On) consistently. * opt.ads (Extensions_Allowed): Update documentation. * sem_attr.adb: Update comment. * doc/gnat_rm/implementation_defined_pragmas.rst: Update documentation of Extensions_Allowed. * gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r--gcc/ada/inline.adb16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 53ca685..b08634e 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -4632,13 +4632,11 @@ package body Inline is
Backend_Not_Inlined_Subps := No_Elist;
end Initialize;
- --------------------------------------------
- -- Inline_Static_Expression_Function_Call --
- --------------------------------------------
+ ---------------------------------
+ -- Inline_Static_Function_Call --
+ ---------------------------------
- procedure Inline_Static_Expression_Function_Call
- (N : Node_Id; Subp : Entity_Id)
- is
+ procedure Inline_Static_Function_Call (N : Node_Id; Subp : Entity_Id) is
function Replace_Formal (N : Node_Id) return Traverse_Result;
-- Replace each occurrence of a formal with the corresponding actual,
@@ -4697,10 +4695,10 @@ package body Inline is
procedure Reset_Slocs is new Traverse_Proc (Reset_Sloc);
- -- Start of processing for Inline_Static_Expression_Function_Call
+ -- Start of processing for Inline_Static_Function_Call
begin
- pragma Assert (Is_Static_Expression_Function_Call (N));
+ pragma Assert (Is_Static_Function_Call (N));
declare
Decls : constant List_Id := New_List;
@@ -4759,7 +4757,7 @@ package body Inline is
Reset_Actual_Mapping_For_Inlined_Call (Subp);
end;
- end Inline_Static_Expression_Function_Call;
+ end Inline_Static_Function_Call;
------------------------
-- Instantiate_Bodies --