aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/rtsfind.adb
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2021-03-29 17:09:31 -0700
committerPierre-Marie de Rodat <derodat@adacore.com>2021-06-21 06:45:17 -0400
commit20922782976048592eb9240ad2ab8690b207dc24 (patch)
tree748250705a37e2de4446058ca5a8e2bf0cf2c5d4 /gcc/ada/rtsfind.adb
parent88bed4e088a197e89051b520da8bb3631a10f9c0 (diff)
downloadgcc-20922782976048592eb9240ad2ab8690b207dc24.zip
gcc-20922782976048592eb9240ad2ab8690b207dc24.tar.gz
gcc-20922782976048592eb9240ad2ab8690b207dc24.tar.bz2
[Ada] Add Ada.Strings.Text_Buffers and replace uses of Ada.Strings.Text_Output
gcc/ada/ * Make-generated.in (GEN_IL_FLAGS): Keep only GNAT flags. (ada/stamp-gen_il): Remove dependencies on libgnat/ sources. Do not copy libgnat/ sources locally and tidy up. * Makefile.rtl: Include object files for new Text_Buffer units in the GNATRTL_NONTASKING_OBJS list. * exp_put_image.ads, exp_put_image.adb: Update Rtsfind calls to match new specs. For example, calls to RE_Sink are replaced with calls to RE_Root_Buffer_Type. Update comments and change subprogram names accordingly (e.g., Preload_Sink is changed to Preload_Root_Buffer_Type). * impunit.adb: Add 6 new predefined units (Text_Buffers and 5 child units thereof). * rtsfind.ads, rtsfind.adb: Add interfaces for accessing the Ada.Strings.Text_Buffers package and declarations therein (including the Unbounded child unit). Do not (yet) delete interfaces for accessing the old Text_Output package. * sem_attr.adb (Check_Put_Image_Attribute): Replace RE_Sink uses with RE_Root_Buffer_Type and update comments accordingly. * sem_ch10.adb (Analyze_Compilation_Unit): Update call to reflect name change of callee (that is, the former Preload_Sink is now Preload_Root_Buffer_Type). * sem_ch13.adb (Has_Good_Profile): Replace RE_Sink use with RE_Root_Buffer_Type. (Build_Spec): Update comment describing a parameter type. * gen_il.ads: Remove clauses for the old Text_Output package and add them for Ada.Streams.Stream_IO. (Sink): Declare. (Create_File): Likewise. (Increase_Indent): Likewise. (Decrease_Indent): Likewise. (Put): Likewise. (LF): Likewise. * gen_il.adb: Add clauses for Ada.Streams.Stream_IO. (Create_File): New procedure. (Increase_Indent): Likewise. (Decrease_Indent): Likewise. (Put): New procedures. * gen_il-gen.adb: Add clauses for Ada.Text_IO. Replace Sink'Class with Sink throughout. Use string concatenation and LF marker instead of formatted strings and "\n" marker. Update Indent/Outdent calls to use new Increase_Indent/Decrease_Indent names. (Put_Membership_Query_Decl): Remove. * gen_il-internals.ads: Replace Sink'Class with Sink throughout. (Ptypes): Remove. (Pfields): Likewise. * gen_il-internals.adb: Remove clauses for GNAT.OS_Lib and Ada.Strings.Text_Buffers.Files. Replace Sink'Class with Sink throughout. Use string concatenation and LF marker instead of formatted strings and "\n" marker. (Stdout): Remove. (Ptypes): Likewise. (Pfields): Likewise. * libgnarl/s-putaim.ads: Modify context clause, update declaration of subtype Sink to refer to Text_Buffers.Root_Buffer_Type instead of the old Text_Output.Sink type. * libgnarl/s-putaim.adb: Modify context clause and add use clause to refer to Text_Buffers package. * libgnat/a-cbdlli.ads, libgnat/a-cbdlli.adb, libgnat/a-cbhama.ads, libgnat/a-cbhama.adb, libgnat/a-cbhase.ads, libgnat/a-cbhase.adb, libgnat/a-cbmutr.ads, libgnat/a-cbmutr.adb, libgnat/a-cborma.ads, libgnat/a-cborma.adb, libgnat/a-cborse.ads, libgnat/a-cborse.adb, libgnat/a-cdlili.ads, libgnat/a-cdlili.adb, libgnat/a-cidlli.ads, libgnat/a-cidlli.adb, libgnat/a-cihama.ads, libgnat/a-cihama.adb, libgnat/a-cihase.ads, libgnat/a-cihase.adb, libgnat/a-cimutr.ads, libgnat/a-cimutr.adb, libgnat/a-ciorma.ads, libgnat/a-ciorma.adb, libgnat/a-ciormu.ads, libgnat/a-ciormu.adb, libgnat/a-ciorse.ads, libgnat/a-ciorse.adb, libgnat/a-coboho.ads, libgnat/a-coboho.adb, libgnat/a-cobove.ads, libgnat/a-cobove.adb, libgnat/a-cohama.ads, libgnat/a-cohama.adb, libgnat/a-cohase.ads, libgnat/a-cohase.adb, libgnat/a-coinho.ads, libgnat/a-coinho.adb, libgnat/a-coinho__shared.ads, libgnat/a-coinho__shared.adb, libgnat/a-coinve.ads, libgnat/a-coinve.adb, libgnat/a-comutr.ads, libgnat/a-comutr.adb, libgnat/a-convec.ads, libgnat/a-convec.adb, libgnat/a-coorma.ads, libgnat/a-coorma.adb, libgnat/a-coormu.ads, libgnat/a-coormu.adb, libgnat/a-coorse.ads, libgnat/a-coorse.adb, libgnat/a-nbnbin.ads, libgnat/a-nbnbin.adb, libgnat/a-nbnbin__gmp.adb, libgnat/a-nbnbre.ads, libgnat/a-nbnbre.adb, libgnat/a-strunb.ads, libgnat/a-strunb.adb, libgnat/a-strunb__shared.ads, libgnat/a-strunb__shared.adb, libgnat/s-rannum.ads, libgnat/s-rannum.adb: Modify Put_Image procedure used in Put_Image aspect specification to conform to Ada profile rules (in particular, the first parameter shall be of type Ada.Strings.Text_Buffers.Root_Buffer_Type'Class). * libgnat/a-sttebu.ads, libgnat/a-sttebu.adb, libgnat/a-stbubo.ads, libgnat/a-stbubo.adb, libgnat/a-stbufi.ads, libgnat/a-stbufi.adb, libgnat/a-stbufo.ads, libgnat/a-stbufo.adb, libgnat/a-stbuun.ads, libgnat/a-stbuun.adb, libgnat/a-stbuut.ads, libgnat/a-stbuut.adb: A new predefined unit, Ada.Strings.Text_Buffers, and five child units. Two of the five are RM-defined: Bounded and Unbounded. The remaining three are GNAT-defined: Files, Utils, and Formatting. The buffer type corresponding to an output file, type Files.File_Buffer, is simpler (and perhaps therefore slower) than its predecessor. Caching similar to what was being done before could be added later if that seems appropriate. * libgnat/s-putima.ads: Modify context clause, update declaration of subtype Sink to refer to Text_Buffers.Root_Buffer_Type instead of the old Text_Output.Sink type. * libgnat/s-putima.adb: Modify context clause. Update Indent/Outdent calls to use new Increase_Indent/Decrease_Indent names; ditto for "Put_String => Put" name change. * libgnat/a-stteou__bootstrap.ads: Delete.
Diffstat (limited to 'gcc/ada/rtsfind.adb')
-rw-r--r--gcc/ada/rtsfind.adb11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/ada/rtsfind.adb b/gcc/ada/rtsfind.adb
index 175bc14..6fe6f85 100644
--- a/gcc/ada/rtsfind.adb
+++ b/gcc/ada/rtsfind.adb
@@ -574,10 +574,11 @@ package body Rtsfind is
range Ada_Streams_Stream_IO .. Ada_Streams_Stream_IO;
subtype Ada_Strings_Descendant is Ada_Descendant
- range Ada_Strings_Superbounded .. Ada_Strings_Text_Output_Buffers;
+ range Ada_Strings_Superbounded .. Ada_Strings_Text_Buffers_Unbounded;
- subtype Ada_Strings_Text_Output_Descendant is Ada_Strings_Descendant
- range Ada_Strings_Text_Output_Utils .. Ada_Strings_Text_Output_Buffers;
+ subtype Ada_Strings_Text_Buffers_Descendant is Ada_Strings_Descendant
+ range Ada_Strings_Text_Buffers_Unbounded ..
+ Ada_Strings_Text_Buffers_Unbounded;
subtype Ada_Text_IO_Descendant is Ada_Descendant
range Ada_Text_IO_Decimal_IO .. Ada_Text_IO_Modular_IO;
@@ -661,8 +662,8 @@ package body Rtsfind is
elsif U_Id in Ada_Strings_Descendant then
Name_Buffer (12) := '.';
- if U_Id in Ada_Strings_Text_Output_Descendant then
- Name_Buffer (24) := '.';
+ if U_Id in Ada_Strings_Text_Buffers_Descendant then
+ Name_Buffer (25) := '.';
end if;
elsif U_Id in Ada_Text_IO_Descendant then