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 @@ -385,6 +385,12 @@ package body Tree_Walk is
385
385
and then List_Length (Expressions (N)) = 1 ),
386
386
Post => Kind (Do_Attribute_Succ_Discrete'Result) in Class_Expr;
387
387
388
+ function Do_Attribute_Address (N : Node_Id) return Irep
389
+ with Pre => (Nkind (N) = N_Attribute_Reference
390
+ and then Get_Attribute_Id (Attribute_Name (N)) =
391
+ Attribute_Address),
392
+ Post => Kind (Do_Attribute_Address'Result) in Class_Expr;
393
+
388
394
function Make_Malloc_Function_Call_Expr (Num_Elem : Irep;
389
395
Element_Type_Size : Uint;
390
396
Source_Loc : Source_Ptr)
@@ -1356,6 +1362,12 @@ package body Tree_Walk is
1356
1362
I_Type => Result_Type);
1357
1363
end Do_Attribute_Succ_Discrete ;
1358
1364
1365
+ function Do_Attribute_Address (N : Node_Id) return Irep is
1366
+ Arg_Expr : constant Irep := Do_Expression (Prefix (N));
1367
+ begin
1368
+ return Make_Address_Of (Arg_Expr);
1369
+ end Do_Attribute_Address ;
1370
+
1359
1371
-- -----------------
1360
1372
-- Do_Expression --
1361
1373
-- -----------------
@@ -1397,6 +1409,8 @@ package body Tree_Walk is
1397
1409
return Do_Attribute_Pred_Discrete (N);
1398
1410
when Attribute_Succ =>
1399
1411
return Do_Attribute_Succ_Discrete (N);
1412
+ when Attribute_Address =>
1413
+ return Do_Attribute_Address (N);
1400
1414
when others =>
1401
1415
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
1402
1416
" Unknown attribute" );
You can’t perform that action at this time.
0 commit comments