Commit eb2d5ccc by Arnaud Charlet

Minor reformatting.

From-SVN: r247238
parent e44e8a5e
...@@ -5198,9 +5198,8 @@ package body Exp_Util is ...@@ -5198,9 +5198,8 @@ package body Exp_Util is
U_Typ : constant Entity_Id := Unique_Entity (Typ); U_Typ : constant Entity_Id := Unique_Entity (Typ);
Calls_OK : Boolean := False; Calls_OK : Boolean := False;
-- This flag is set to True when expression Expr contains at -- This flag is set to True when expression Expr contains at least one
-- least one call to a non-dispatching primitive function of -- call to a non-dispatching primitive function of Typ.
-- Typ.
function Search_Primitive_Calls (N : Node_Id) return Traverse_Result; function Search_Primitive_Calls (N : Node_Id) return Traverse_Result;
-- Search for nondispatching calls to primitive functions of type Typ -- Search for nondispatching calls to primitive functions of type Typ
...@@ -5209,9 +5208,7 @@ package body Exp_Util is ...@@ -5209,9 +5208,7 @@ package body Exp_Util is
-- Search_Primitive_Calls -- -- Search_Primitive_Calls --
---------------------------- ----------------------------
function Search_Primitive_Calls function Search_Primitive_Calls (N : Node_Id) return Traverse_Result is
(N : Node_Id) return Traverse_Result
is
Disp_Typ : Entity_Id; Disp_Typ : Entity_Id;
Subp : Entity_Id; Subp : Entity_Id;
...@@ -5224,24 +5221,24 @@ package body Exp_Util is ...@@ -5224,24 +5221,24 @@ package body Exp_Util is
then then
Subp := Entity (Name (N)); Subp := Entity (Name (N));
-- Do not consider function calls with a controlling argument -- Do not consider function calls with a controlling argument as
-- as those are always dispatching calls. -- those are always dispatching calls.
if Is_Dispatching_Operation (Subp) if Is_Dispatching_Operation (Subp)
and then No (Controlling_Argument (N)) and then No (Controlling_Argument (N))
then then
Disp_Typ := Find_Dispatching_Type (Subp); Disp_Typ := Find_Dispatching_Type (Subp);
-- To qualify as a suitable primitive, the dispatching -- To qualify as a suitable primitive, the dispatching type of
-- type of the function must be the input type. -- the function must be the input type.
if Present (Disp_Typ) if Present (Disp_Typ)
and then Unique_Entity (Disp_Typ) = U_Typ and then Unique_Entity (Disp_Typ) = U_Typ
then then
Calls_OK := True; Calls_OK := True;
-- There is no need to continue the traversal as one -- There is no need to continue the traversal as one such
-- such call suffices. -- call suffices.
return Abandon; return Abandon;
end if; end if;
...@@ -5251,8 +5248,7 @@ package body Exp_Util is ...@@ -5251,8 +5248,7 @@ package body Exp_Util is
return OK; return OK;
end Search_Primitive_Calls; end Search_Primitive_Calls;
procedure Search_Calls is procedure Search_Calls is new Traverse_Proc (Search_Primitive_Calls);
new Traverse_Proc (Search_Primitive_Calls);
-- Start of processing for Expression_Contains_Primitives_Calls_Of_Type -- Start of processing for Expression_Contains_Primitives_Calls_Of_Type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment