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
3030 return R;
3131 end Make_Address_Of ;
3232
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+
3345 -- -----------------
3446 -- Make_Int_Type --
3547 -- -----------------
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ package GOTO_Utils is
2222
2323 type String_Access is access String;
2424
25+ function Is_Prefix (Prefix : String; Base_String : String) return Boolean;
26+
2527 package Addressed_Variables is new
2628 GNAT.Table (Table_Component_Type => String_Access,
2729 Table_Index_Type => Natural,
Original file line number Diff line number Diff line change @@ -5460,7 +5460,8 @@ package body Tree_Walk is
54605460 Default_Body : Irep := Make_Nil (Sloc (N));
54615461 begin
54625462 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)))
54645465 then
54655466 Default_Body := Build_Identity_Body (Get_Parameters (Subprog_Type));
54665467 end if ;
You can’t perform that action at this time.
0 commit comments