2014-12-12 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ada / sinput-d.ads
blob138743347d2f5bcf92b7c6ce4d9da13bf6f360f8
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N P U T . D --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 2001-2008, 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 -- This child package contains the routines used to write debug source
27 -- files. These routines are not in Sinput.L, because they are used only
28 -- by the compiler, while Sinput.L is also used by gnatmake.
30 package Sinput.D is
32 ------------------------------------------------
33 -- Subprograms for Writing Debug Source Files --
34 ------------------------------------------------
36 procedure Create_Debug_Source
37 (Source : Source_File_Index;
38 Loc : out Source_Ptr);
39 -- Given a source file, creates a new source file table entry to be used
40 -- for the debug source file output (Debug_Generated_Code switch set).
41 -- Loc is set to the initial Sloc value for the first line. This call
42 -- also creates the debug source output file (using Create_Debug_File).
44 procedure Write_Debug_Line (Str : String; Loc : in out Source_Ptr);
45 -- This procedure is called to write a line to the debug source file
46 -- previously created by Create_Debug_Source using Write_Debug_Info.
47 -- Str is the source line to be written to the file (it does not include
48 -- an end of line character). On entry Loc is the Sloc value previously
49 -- returned by Create_Debug_Source or Write_Debug_Line, and on exit,
50 -- Sloc is updated to point to the start of the next line to be written,
51 -- taking into account the length of the terminator that was written by
52 -- Write_Debug_Info.
54 procedure Close_Debug_Source;
55 -- This procedure completes the source table entry for the debug file
56 -- previously created by Create_Debug_Source, and written using the
57 -- Write_Debug_Line procedure. It then calls Close_Debug_File to
58 -- complete the writing of the file itself.
60 end Sinput.D;