------------------------------------------------------------------------------
with Atree; use Atree;
-with Debug; use Debug;
with Einfo; use Einfo;
with Elists; use Elists;
with Exp_Disp; use Exp_Disp;
begin
-- No output if the "ci" output file has not been previously opened
- -- by toplev.c. Temporarily the output is also disabled with -gnatd.Z
+ -- by toplev.c
- if Callgraph_Info_File = Null_Address
- or else not Debug_Flag_Dot_ZZ
- then
+ if Callgraph_Info_File = Null_Address then
return;
end if;
end if;
end loop;
- if Ada_Version >= Ada_05 then
+ if Ada_Version >= Ada_2005 then
for J in Predef_Names_05'Range loop
Get_Name_String (Predef_Names_05 (J));
or else Entity_Is_In_Main_Unit (Current_Scope)
then
-- Register a copy of the dispatching call node. Needed since the
- -- node containing a dispatching call is rewriten by the expander.
+ -- node containing a dispatching call is rewritten by the
+ -- expander.
declare
Copy : constant Node_Id := New_Copy (N);
-----------------
function Slot_Number (Prim : Entity_Id) return Uint is
+ E : constant Entity_Id := Ultimate_Alias (Prim);
begin
- if Is_Predefined_Dispatching_Operation (Prim) then
- return -DT_Position (Prim);
+ if Is_Predefined_Dispatching_Operation (E) then
+ return -DT_Position (E);
else
- return DT_Position (Prim);
+ return DT_Position (E);
end if;
end Slot_Number;
Nul : constant Character := Character'First;
Line : String (Str'First .. Str'Last + 1);
Errno : Integer;
+
begin
-- Add the null character to the string as required by fputs
and then
Is_Ancestor
(Find_Dispatching_Type (Ultimate_Alias (Prim)),
- Root_Type (Ctrl_Typ))
+ Root_Type (Ctrl_Typ),
+ Use_Full_View => True)
then
-- This is a special case in which we generate in the ci file the
-- slot number of the renaming primitive (i.e. Base2) but instead of
Prim := Node (Elmt);
-- Skip internal entities associated with overridden interface
- -- primitives
+ -- primitives, and also inherited primitives.
- if Present (Interface_Alias (Prim)) then
+ if Present (Interface_Alias (Prim))
+ or else
+ (Present (Alias (Prim))
+ and then Find_Dispatching_Type (Prim) /=
+ Find_Dispatching_Type (Alias (Prim)))
+ then
goto Continue;
end if;
if Present (Overridden_Operation (Prim))
and then
Is_Ancestor
- (Find_Dispatching_Type (Overridden_Operation (Prim)), Typ)
+ (Find_Dispatching_Type (Overridden_Operation (Prim)), Typ,
+ Use_Full_View => True)
then
Write_Char (',');
Write_Int
Int_Alias := Interface_Alias (Prim_Op);
if Present (Int_Alias)
- and then not Is_Ancestor
- (Find_Dispatching_Type (Int_Alias), Typ)
+ and then
+ not Is_Ancestor (Find_Dispatching_Type (Int_Alias), Typ,
+ Use_Full_View => True)
and then (Alias (Prim_Op)) = Prim
then
Write_Char (',');