Skip to content

Commit bede848

Browse files
committed
Call function-symbol-entry wrapper
in make_runtime_check.
1 parent ea55211 commit bede848

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

gnat2goto/driver/tree_walk.adb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4487,6 +4487,7 @@ package body Tree_Walk is
44874487
-- Create the check function on demand:
44884488
declare
44894489
Fn_Symbol : Symbol;
4490+
Fn_Name : constant String := "__ada_runtime_check";
44904491
Assertion : constant Irep := New_Irep (I_Code_Assert);
44914492
Formal_Params : constant Irep := New_Irep (I_Parameter_List);
44924493
Formal_Param : constant Irep := New_Irep (I_Code_Parameter);
@@ -4504,15 +4505,14 @@ package body Tree_Walk is
45044505
Set_Return_Type (Fn_Type, Void_Type);
45054506
Set_Assertion (Assertion, Formal_Expr);
45064507

4507-
Fn_Symbol.Name := Intern ("__ada_runtime_check");
4508-
Fn_Symbol.PrettyName := Fn_Symbol.Name;
4509-
Fn_Symbol.BaseName := Fn_Symbol.Name;
4510-
Fn_Symbol.Value := Assertion;
4511-
Fn_Symbol.SymType := Fn_Type;
4512-
Global_Symbol_Table.Insert (Fn_Symbol.Name, Fn_Symbol);
4508+
Fn_Symbol :=
4509+
New_Function_Symbol_Entry (Name => Fn_Name,
4510+
Symbol_Type => Fn_Type,
4511+
Value => Assertion,
4512+
A_Symbol_Table => Global_Symbol_Table);
45134513

45144514
Check_Function_Symbol := New_Irep (I_Symbol_Expr);
4515-
Set_Identifier (Check_Function_Symbol, Unintern (Fn_Symbol.Name));
4515+
Set_Identifier (Check_Function_Symbol, Fn_Name);
45164516
Set_Type (Check_Function_Symbol, Fn_Symbol.SymType);
45174517
end;
45184518
end if;

0 commit comments

Comments
 (0)