PR rtl-optimization/82913
[official-gcc.git] / gcc / ada / lib-util.ads
blobf4034d62d6dd4fd0bdd78742745c46872612509e
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- L I B . U T I L --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
20 -- --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
23 -- --
24 ------------------------------------------------------------------------------
26 with Uintp; use Uintp;
28 package Lib.Util is
30 -- This package implements a buffered write of library information
32 procedure Write_Info_Char (C : Character);
33 pragma Inline (Write_Info_Char);
34 -- Adds one character to the info
36 procedure Write_Info_Char_Code (Code : Char_Code);
37 -- Write a single character code. Upper half values in the range
38 -- 16#80..16#FF are written as Uhh (hh = 2 hex digits), and values
39 -- greater than 16#FF are written as Whhhh (hhhh = 4 hex digits).
41 function Write_Info_Col return Positive;
42 -- Returns the column in which the next character will be written
44 procedure Write_Info_EOL;
45 -- Terminate current info line. This only flushes the buffer
46 -- if there is not enough room for another complete line or
47 -- if the host system needs a write for each line.
49 procedure Write_Info_Initiate (Key : Character);
50 -- Initiates write of new line to info file, the parameter is the keyword
51 -- character for the line. The caller is responsible for writing the
52 -- required blank after the key character if needed.
54 procedure Write_Info_Nat (N : Nat);
55 -- Adds image of N to Info_Buffer with no leading or trailing blanks
57 procedure Write_Info_Int (N : Int);
58 -- Adds image of N to Info_Buffer with no leading or trailing blanks. A
59 -- minus sign is prepended for negative values.
61 procedure Write_Info_Name (Name : Name_Id);
62 procedure Write_Info_Name (Name : File_Name_Type);
63 procedure Write_Info_Name (Name : Unit_Name_Type);
64 -- Adds characters of Name to Info_Buffer. Note that in all cases, the
65 -- name is written literally from the names table entry without modifying
66 -- the case, using simply Get_Name_String.
68 procedure Write_Info_Name_May_Be_Quoted (Name : File_Name_Type);
69 -- Similar to Write_Info_Name, but if Name includes spaces, then it is
70 -- quoted and the '"' are doubled.
72 procedure Write_Info_Slit (S : String_Id);
73 -- Write string literal value in format required for L/N lines in ali file
75 procedure Write_Info_Str (Val : String);
76 -- Adds characters of Val to Info_Buffer surrounded by quotes
78 procedure Write_Info_Tab (Col : Positive);
79 -- Tab out with blanks and HT's to column Col. If already at or past
80 -- Col, writes a single blank, so that we do get a required field
81 -- separation.
83 procedure Write_Info_Terminate;
84 -- Terminate current info line and output lines built in Info_Buffer
86 procedure Write_Info_Uint (N : Uint);
87 -- Adds decimal image of N to Info_Buffer with no leading or trailing
88 -- blanks. A minus sign is prepended for negative values.
90 end Lib.Util;