File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,18 @@ package body GOTO_Utils is
30
30
return R;
31
31
end Make_Address_Of ;
32
32
33
+ function Is_Prefix (Prefix : String; Base_String : String) return Boolean
34
+ is
35
+ begin
36
+ if Prefix'Length < Base_String'Length and then
37
+ Prefix = Base_String (Base_String'First .. Prefix'Length)
38
+ then
39
+ return True;
40
+ else
41
+ return False;
42
+ end if ;
43
+ end Is_Prefix ;
44
+
33
45
-- -----------------
34
46
-- Make_Int_Type --
35
47
-- -----------------
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ package GOTO_Utils is
22
22
23
23
type String_Access is access String;
24
24
25
+ function Is_Prefix (Prefix : String; Base_String : String) return Boolean;
26
+
25
27
package Addressed_Variables is new
26
28
GNAT.Table (Table_Component_Type => String_Access,
27
29
Table_Index_Type => Natural,
Original file line number Diff line number Diff line change @@ -5460,7 +5460,8 @@ package body Tree_Walk is
5460
5460
Default_Body : Irep := Make_Nil (Sloc (N));
5461
5461
begin
5462
5462
if List_Length (Parameter_Specifications (N)) = 1 and
5463
- not (Kind (Get_Return_Type (Subprog_Type)) = I_Void_Type)
5463
+ not (Kind (Get_Return_Type (Subprog_Type)) = I_Void_Type) and
5464
+ Is_Prefix (" system" , Unique_Name (Defining_Unit_Name (N)))
5464
5465
then
5465
5466
Default_Body := Build_Identity_Body (Get_Parameters (Subprog_Type));
5466
5467
end if ;
You can’t perform that action at this time.
0 commit comments