Skip to content

Commit 06173f9

Browse files
committed
Use wrapper for new param symbol
in do_subprogram_specification.
1 parent e5dfde8 commit 06173f9

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

gnat2goto/driver/tree_walk.adb

+4-10
Original file line numberDiff line numberDiff line change
@@ -4137,7 +4137,6 @@ package body Tree_Walk is
41374137
Unique_Name (Defining_Identifier (Param_Iter));
41384138

41394139
Param_Irep : constant Irep := New_Irep (I_Code_Parameter);
4140-
Param_Symbol : Symbol;
41414140
begin
41424141
if not (Nkind (Parameter_Type (Param_Iter)) in N_Has_Etype) then
41434142
Report_Unhandled_Node_Empty (N, "Do_Subprogram_Specification",
@@ -4156,15 +4155,10 @@ package body Tree_Walk is
41564155
Set_Base_Name (Param_Irep, Param_Name);
41574156
Append_Parameter (Param_List, Param_Irep);
41584157
-- Add the param to the symtab as well:
4159-
Param_Symbol.Name := Intern (Param_Name);
4160-
Param_Symbol.PrettyName := Param_Symbol.Name;
4161-
Param_Symbol.BaseName := Param_Symbol.Name;
4162-
Param_Symbol.SymType := Param_Type;
4163-
Param_Symbol.IsThreadLocal := True;
4164-
Param_Symbol.IsFileLocal := True;
4165-
Param_Symbol.IsLValue := True;
4166-
Param_Symbol.IsParameter := True;
4167-
Global_Symbol_Table.Insert (Param_Symbol.Name, Param_Symbol);
4158+
New_Parameter_Symbol_Entry (Name_Id => Intern (Param_Name),
4159+
BaseName => Param_Name,
4160+
Symbol_Type => Param_Type,
4161+
A_Symbol_Table => Global_Symbol_Table);
41684162
Next (Param_Iter);
41694163
end;
41704164
end loop;

0 commit comments

Comments
 (0)