From: Bob Duff Date: Fri, 13 Dec 2019 09:04:12 +0000 (+0000) Subject: [Ada] Remove Is_Available function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c9e4a1d65bc7ff2747f714ebb48a41827f4f74b;p=gcc.git [Ada] Remove Is_Available function 2019-12-13 Bob Duff gcc/ada/ * exp_attr.adb (Is_Available): Remove this function, and replace all calls with RTE_Available. RTE_Available will return True if "not Configurable_Run_Time_Mode". Remove the "???" comment. From-SVN: r279350 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1da3ebc97ff..475a38912d7 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2019-12-13 Bob Duff + + * exp_attr.adb (Is_Available): Remove this function, and replace + all calls with RTE_Available. RTE_Available will return True if + "not Configurable_Run_Time_Mode". Remove the "???" comment. + 2019-12-13 Ed Schonberg * sem_ch7.adb (Analyze_Package_Body_Helper): Do not call diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index c7b6451430e..7701d723717 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -7818,31 +7818,6 @@ package body Exp_Attr is is Base_Typ : constant Entity_Id := Base_Type (Typ); Ent : constant Entity_Id := TSS (Typ, Nam); - - function Is_Available (Entity : RE_Id) return Boolean; - pragma Inline (Is_Available); - -- Function to check whether the specified run-time call is available - -- in the run time used. In the case of a configurable run time, it - -- is normal that some subprograms are not there. - -- - -- I don't understand this routine at all, why is this not just a - -- call to RTE_Available? And if for some reason we need a different - -- routine with different semantics, why is not in Rtsfind ??? - - ------------------ - -- Is_Available -- - ------------------ - - function Is_Available (Entity : RE_Id) return Boolean is - begin - -- Assume that the unit will always be available when using a - -- "normal" (not configurable) run time. - - return not Configurable_Run_Time_Mode or else RTE_Available (Entity); - end Is_Available; - - -- Start of processing for Find_Stream_Subprogram - begin if Present (Ent) then return Ent; @@ -7859,7 +7834,7 @@ package body Exp_Attr is -- that stream routines for string types are not present (they require -- file system support). In this case, the specific stream routines for -- strings are not used, relying on the regular stream mechanism - -- instead. That is why we include the test Is_Available when dealing + -- instead. That is why we include the test RTE_Available when dealing -- with these cases. if not Is_Predefined_Unit (Current_Sem_Unit) then @@ -7871,22 +7846,22 @@ package body Exp_Attr is if Restriction_Active (No_Stream_Optimizations) then if Nam = TSS_Stream_Input - and then Is_Available (RE_Storage_Array_Input) + and then RTE_Available (RE_Storage_Array_Input) then return RTE (RE_Storage_Array_Input); elsif Nam = TSS_Stream_Output - and then Is_Available (RE_Storage_Array_Output) + and then RTE_Available (RE_Storage_Array_Output) then return RTE (RE_Storage_Array_Output); elsif Nam = TSS_Stream_Read - and then Is_Available (RE_Storage_Array_Read) + and then RTE_Available (RE_Storage_Array_Read) then return RTE (RE_Storage_Array_Read); elsif Nam = TSS_Stream_Write - and then Is_Available (RE_Storage_Array_Write) + and then RTE_Available (RE_Storage_Array_Write) then return RTE (RE_Storage_Array_Write); @@ -7903,22 +7878,22 @@ package body Exp_Attr is else if Nam = TSS_Stream_Input - and then Is_Available (RE_Storage_Array_Input_Blk_IO) + and then RTE_Available (RE_Storage_Array_Input_Blk_IO) then return RTE (RE_Storage_Array_Input_Blk_IO); elsif Nam = TSS_Stream_Output - and then Is_Available (RE_Storage_Array_Output_Blk_IO) + and then RTE_Available (RE_Storage_Array_Output_Blk_IO) then return RTE (RE_Storage_Array_Output_Blk_IO); elsif Nam = TSS_Stream_Read - and then Is_Available (RE_Storage_Array_Read_Blk_IO) + and then RTE_Available (RE_Storage_Array_Read_Blk_IO) then return RTE (RE_Storage_Array_Read_Blk_IO); elsif Nam = TSS_Stream_Write - and then Is_Available (RE_Storage_Array_Write_Blk_IO) + and then RTE_Available (RE_Storage_Array_Write_Blk_IO) then return RTE (RE_Storage_Array_Write_Blk_IO); @@ -7939,22 +7914,22 @@ package body Exp_Attr is if Restriction_Active (No_Stream_Optimizations) then if Nam = TSS_Stream_Input - and then Is_Available (RE_Stream_Element_Array_Input) + and then RTE_Available (RE_Stream_Element_Array_Input) then return RTE (RE_Stream_Element_Array_Input); elsif Nam = TSS_Stream_Output - and then Is_Available (RE_Stream_Element_Array_Output) + and then RTE_Available (RE_Stream_Element_Array_Output) then return RTE (RE_Stream_Element_Array_Output); elsif Nam = TSS_Stream_Read - and then Is_Available (RE_Stream_Element_Array_Read) + and then RTE_Available (RE_Stream_Element_Array_Read) then return RTE (RE_Stream_Element_Array_Read); elsif Nam = TSS_Stream_Write - and then Is_Available (RE_Stream_Element_Array_Write) + and then RTE_Available (RE_Stream_Element_Array_Write) then return RTE (RE_Stream_Element_Array_Write); @@ -7971,22 +7946,22 @@ package body Exp_Attr is else if Nam = TSS_Stream_Input - and then Is_Available (RE_Stream_Element_Array_Input_Blk_IO) + and then RTE_Available (RE_Stream_Element_Array_Input_Blk_IO) then return RTE (RE_Stream_Element_Array_Input_Blk_IO); elsif Nam = TSS_Stream_Output - and then Is_Available (RE_Stream_Element_Array_Output_Blk_IO) + and then RTE_Available (RE_Stream_Element_Array_Output_Blk_IO) then return RTE (RE_Stream_Element_Array_Output_Blk_IO); elsif Nam = TSS_Stream_Read - and then Is_Available (RE_Stream_Element_Array_Read_Blk_IO) + and then RTE_Available (RE_Stream_Element_Array_Read_Blk_IO) then return RTE (RE_Stream_Element_Array_Read_Blk_IO); elsif Nam = TSS_Stream_Write - and then Is_Available (RE_Stream_Element_Array_Write_Blk_IO) + and then RTE_Available (RE_Stream_Element_Array_Write_Blk_IO) then return RTE (RE_Stream_Element_Array_Write_Blk_IO); @@ -8007,22 +7982,22 @@ package body Exp_Attr is if Restriction_Active (No_Stream_Optimizations) then if Nam = TSS_Stream_Input - and then Is_Available (RE_String_Input) + and then RTE_Available (RE_String_Input) then return RTE (RE_String_Input); elsif Nam = TSS_Stream_Output - and then Is_Available (RE_String_Output) + and then RTE_Available (RE_String_Output) then return RTE (RE_String_Output); elsif Nam = TSS_Stream_Read - and then Is_Available (RE_String_Read) + and then RTE_Available (RE_String_Read) then return RTE (RE_String_Read); elsif Nam = TSS_Stream_Write - and then Is_Available (RE_String_Write) + and then RTE_Available (RE_String_Write) then return RTE (RE_String_Write); @@ -8039,22 +8014,22 @@ package body Exp_Attr is else if Nam = TSS_Stream_Input - and then Is_Available (RE_String_Input_Blk_IO) + and then RTE_Available (RE_String_Input_Blk_IO) then return RTE (RE_String_Input_Blk_IO); elsif Nam = TSS_Stream_Output - and then Is_Available (RE_String_Output_Blk_IO) + and then RTE_Available (RE_String_Output_Blk_IO) then return RTE (RE_String_Output_Blk_IO); elsif Nam = TSS_Stream_Read - and then Is_Available (RE_String_Read_Blk_IO) + and then RTE_Available (RE_String_Read_Blk_IO) then return RTE (RE_String_Read_Blk_IO); elsif Nam = TSS_Stream_Write - and then Is_Available (RE_String_Write_Blk_IO) + and then RTE_Available (RE_String_Write_Blk_IO) then return RTE (RE_String_Write_Blk_IO); @@ -8075,22 +8050,22 @@ package body Exp_Attr is if Restriction_Active (No_Stream_Optimizations) then if Nam = TSS_Stream_Input - and then Is_Available (RE_Wide_String_Input) + and then RTE_Available (RE_Wide_String_Input) then return RTE (RE_Wide_String_Input); elsif Nam = TSS_Stream_Output - and then Is_Available (RE_Wide_String_Output) + and then RTE_Available (RE_Wide_String_Output) then return RTE (RE_Wide_String_Output); elsif Nam = TSS_Stream_Read - and then Is_Available (RE_Wide_String_Read) + and then RTE_Available (RE_Wide_String_Read) then return RTE (RE_Wide_String_Read); elsif Nam = TSS_Stream_Write - and then Is_Available (RE_Wide_String_Write) + and then RTE_Available (RE_Wide_String_Write) then return RTE (RE_Wide_String_Write); @@ -8107,22 +8082,22 @@ package body Exp_Attr is else if Nam = TSS_Stream_Input - and then Is_Available (RE_Wide_String_Input_Blk_IO) + and then RTE_Available (RE_Wide_String_Input_Blk_IO) then return RTE (RE_Wide_String_Input_Blk_IO); elsif Nam = TSS_Stream_Output - and then Is_Available (RE_Wide_String_Output_Blk_IO) + and then RTE_Available (RE_Wide_String_Output_Blk_IO) then return RTE (RE_Wide_String_Output_Blk_IO); elsif Nam = TSS_Stream_Read - and then Is_Available (RE_Wide_String_Read_Blk_IO) + and then RTE_Available (RE_Wide_String_Read_Blk_IO) then return RTE (RE_Wide_String_Read_Blk_IO); elsif Nam = TSS_Stream_Write - and then Is_Available (RE_Wide_String_Write_Blk_IO) + and then RTE_Available (RE_Wide_String_Write_Blk_IO) then return RTE (RE_Wide_String_Write_Blk_IO); @@ -8143,22 +8118,22 @@ package body Exp_Attr is if Restriction_Active (No_Stream_Optimizations) then if Nam = TSS_Stream_Input - and then Is_Available (RE_Wide_Wide_String_Input) + and then RTE_Available (RE_Wide_Wide_String_Input) then return RTE (RE_Wide_Wide_String_Input); elsif Nam = TSS_Stream_Output - and then Is_Available (RE_Wide_Wide_String_Output) + and then RTE_Available (RE_Wide_Wide_String_Output) then return RTE (RE_Wide_Wide_String_Output); elsif Nam = TSS_Stream_Read - and then Is_Available (RE_Wide_Wide_String_Read) + and then RTE_Available (RE_Wide_Wide_String_Read) then return RTE (RE_Wide_Wide_String_Read); elsif Nam = TSS_Stream_Write - and then Is_Available (RE_Wide_Wide_String_Write) + and then RTE_Available (RE_Wide_Wide_String_Write) then return RTE (RE_Wide_Wide_String_Write); @@ -8175,22 +8150,22 @@ package body Exp_Attr is else if Nam = TSS_Stream_Input - and then Is_Available (RE_Wide_Wide_String_Input_Blk_IO) + and then RTE_Available (RE_Wide_Wide_String_Input_Blk_IO) then return RTE (RE_Wide_Wide_String_Input_Blk_IO); elsif Nam = TSS_Stream_Output - and then Is_Available (RE_Wide_Wide_String_Output_Blk_IO) + and then RTE_Available (RE_Wide_Wide_String_Output_Blk_IO) then return RTE (RE_Wide_Wide_String_Output_Blk_IO); elsif Nam = TSS_Stream_Read - and then Is_Available (RE_Wide_Wide_String_Read_Blk_IO) + and then RTE_Available (RE_Wide_Wide_String_Read_Blk_IO) then return RTE (RE_Wide_Wide_String_Read_Blk_IO); elsif Nam = TSS_Stream_Write - and then Is_Available (RE_Wide_Wide_String_Write_Blk_IO) + and then RTE_Available (RE_Wide_Wide_String_Write_Blk_IO) then return RTE (RE_Wide_Wide_String_Write_Blk_IO);