OSDN Git Service

2010-10-11 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / tree_gen.adb
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                             T R E E _ G E N                              --
6 --                                                                          --
7 --                                 B o d y                                  --
8 --                                                                          --
9 --          Copyright (C) 1992-2010, 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 ------------------------------------------------------------------------------
25
26 with Aspects;
27 with Atree;
28 with Debug;
29 with Elists;
30 with Fname;
31 with Lib;
32 with Namet;
33 with Nlists;
34 with Opt;
35 with Osint.C;
36 with Repinfo;
37 with Sem_Aux;
38 with Sinput;
39 with Stand;
40 with Stringt;
41 with Uintp;
42 with Urealp;
43
44 with Tree_In;
45 pragma Warnings (Off, Tree_In);
46 --  We do not use Tree_In in the compiler, but it is small, and worth including
47 --  so that we get the proper license check for Tree_In when the compiler is
48 --  built. This will avoid adding bad dependencies to Tree_In and blowing ASIS.
49
50 procedure Tree_Gen is
51 begin
52    if Opt.Tree_Output then
53       Osint.C.Tree_Create;
54       Opt.Tree_Write;
55
56       --  For now, only write aspect specifications hash table if -gnatd.A set
57
58       if Debug.Debug_Flag_Dot_AA then
59          Aspects.Tree_Write;
60       end if;
61
62       Atree.Tree_Write;
63       Elists.Tree_Write;
64       Fname.Tree_Write;
65       Lib.Tree_Write;
66       Namet.Tree_Write;
67       Nlists.Tree_Write;
68       Sem_Aux.Tree_Write;
69       Sinput.Tree_Write;
70       Stand.Tree_Write;
71       Stringt.Tree_Write;
72       Uintp.Tree_Write;
73       Urealp.Tree_Write;
74       Repinfo.Tree_Write;
75       Osint.C.Tree_Close;
76    end if;
77 end Tree_Gen;