-- Create possible extra actual for accessibility level
- if Present (Get_Accessibility (Formal)) then
+ if Present (Extra_Accessibility (Formal)) then
-- Ada 2005 (AI-252): If the actual was rewritten as an Access
-- attribute, then the original actual may be an aliased object
Add_Extra_Actual
(Expr =>
New_Occurrence_Of (Get_Accessibility (Parm_Ent), Loc),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
end;
elsif Is_Entity_Name (Prev_Orig) then
(Expr =>
New_Occurrence_Of
(Get_Accessibility (Parm_Ent), Loc),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
-- If the actual access parameter does not have an
-- associated extra formal providing its scope level,
(Expr =>
Make_Integer_Literal (Loc,
Intval => Scope_Depth (Standard_Standard)),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
end if;
end;
else
Add_Extra_Actual
(Expr => Dynamic_Accessibility_Level (Prev_Orig),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
end if;
-- If the actual is an access discriminant, then pass the level
(Expr =>
Make_Integer_Literal (Loc,
Intval => Object_Access_Level (Prefix (Prev_Orig))),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
-- All other cases
New_Occurrence_Of
(Get_Accessibility
(Entity (Prev_Ult)), Loc),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
-- Normal case, call Object_Access_Level. Note:
-- should be Dynamic_Accessibility_Level ???
Make_Integer_Literal (Loc,
Intval =>
Object_Access_Level (Prev_Orig)),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
end if;
-- Treat the unchecked attributes as library-level
(Expr =>
Make_Integer_Literal (Loc,
Intval => Scope_Depth (Standard_Standard)),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
-- No other cases of attributes returning access
-- values that can be passed to access parameters.
(Expr =>
Make_Integer_Literal (Loc,
Intval => Scope_Depth (Current_Scope) + 1),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
-- For most other cases we simply pass the level of the
-- actual's access type. The type is retrieved from
Add_Extra_Actual
(Expr => New_Occurrence_Of (Lvl, Loc),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
end;
-- General case uncomplicated by conditional expressions
else
Add_Extra_Actual
(Expr => Dynamic_Accessibility_Level (Prev),
- EF => Get_Accessibility (Formal));
+ EF => Extra_Accessibility (Formal));
end if;
end case;
end if;