File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1191,6 +1191,7 @@ package body Tree_Walk is
1191
1191
function Do_Defining_Identifier (E : Entity_Id) return Irep is
1192
1192
Sym : constant Irep := New_Irep (I_Symbol_Expr);
1193
1193
Result_Type : constant Irep := Do_Type_Reference (Etype (E));
1194
+ Sym_Id : constant Symbol_Id := Intern (Unique_Name (E));
1194
1195
1195
1196
Is_Out_Param : constant Boolean :=
1196
1197
Ekind (E) in E_In_Out_Parameter | E_Out_Parameter;
@@ -1205,6 +1206,20 @@ package body Tree_Walk is
1205
1206
Set_Identifier (Sym, Unique_Name (E));
1206
1207
Set_Type (Sym, Symbol_Type);
1207
1208
1209
+ if not Global_Symbol_Table.Contains (Sym_Id) then
1210
+ declare
1211
+ Variable_Symbol : Symbol;
1212
+ begin
1213
+ Variable_Symbol.Name := Sym_Id;
1214
+ Variable_Symbol.BaseName := Sym_Id;
1215
+ Variable_Symbol.PrettyName := Intern (Get_Name_String (Chars (E)));
1216
+ Variable_Symbol.SymType := Symbol_Type;
1217
+ Variable_Symbol.Mode := Intern (" C" );
1218
+ Variable_Symbol.Value := Make_Nil (Sloc (E));
1219
+ Global_Symbol_Table.Insert (Sym_Id, Variable_Symbol);
1220
+ end ;
1221
+ end if ;
1222
+
1208
1223
if Is_Out_Param then
1209
1224
return Deref : constant Irep := New_Irep (I_Dereference_Expr) do
1210
1225
Set_Type (Deref, Result_Type);
You can’t perform that action at this time.
0 commit comments