File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,12 @@ package body Tree_Walk is
384
384
and then List_Length (Expressions (N)) = 1 ),
385
385
Post => Kind (Do_Attribute_Succ_Discrete'Result) in Class_Expr;
386
386
387
+ function Do_Attribute_Address (N : Node_Id) return Irep
388
+ with Pre => (Nkind (N) = N_Attribute_Reference
389
+ and then Get_Attribute_Id (Attribute_Name (N)) =
390
+ Attribute_Address),
391
+ Post => Kind (Do_Attribute_Address'Result) in Class_Expr;
392
+
387
393
function Make_Malloc_Function_Call_Expr (Num_Elem : Irep;
388
394
Element_Type_Size : Uint;
389
395
Source_Loc : Source_Ptr)
@@ -1358,6 +1364,12 @@ package body Tree_Walk is
1358
1364
I_Type => Result_Type);
1359
1365
end Do_Attribute_Succ_Discrete ;
1360
1366
1367
+ function Do_Attribute_Address (N : Node_Id) return Irep is
1368
+ Arg_Expr : constant Irep := Do_Expression (Prefix (N));
1369
+ begin
1370
+ return Make_Address_Of (Arg_Expr);
1371
+ end Do_Attribute_Address ;
1372
+
1361
1373
-- -----------------
1362
1374
-- Do_Expression --
1363
1375
-- -----------------
@@ -1399,6 +1411,8 @@ package body Tree_Walk is
1399
1411
return Do_Attribute_Pred_Discrete (N);
1400
1412
when Attribute_Succ =>
1401
1413
return Do_Attribute_Succ_Discrete (N);
1414
+ when Attribute_Address =>
1415
+ return Do_Attribute_Address (N);
1402
1416
when others =>
1403
1417
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
1404
1418
" Unknown attribute" );
You can’t perform that action at this time.
0 commit comments