LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / ada / spark_xrefs.adb
blob7739034992f6d36a698abef2d4261e6b3c91c04d
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S P A R K _ X R E F S --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 2011-2018, 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 Lib.Xref;
27 with Output; use Output;
28 with Sem_Util; use Sem_Util;
30 package body SPARK_Xrefs is
32 ------------
33 -- dspark --
34 ------------
36 procedure dspark is
38 procedure Dump (Index : Nat; AXR : SPARK_Xref_Record);
40 procedure Dump_SPARK_Xrefs is new
41 Lib.Xref.SPARK_Specific.Iterate_SPARK_Xrefs (Dump);
43 ----------
44 -- Dump --
45 ----------
47 procedure Dump (Index : Nat; AXR : SPARK_Xref_Record) is
48 begin
49 Write_Str (" ");
50 Write_Int (Index);
51 Write_Char ('.');
53 Write_Str (" Entity = " & Unique_Name (AXR.Entity));
54 Write_Str (" (");
55 Write_Int (Nat (AXR.Entity));
56 Write_Str (")");
58 Write_Str (" Scope = " & Unique_Name (AXR.Ref_Scope));
59 Write_Str (" (");
60 Write_Int (Nat (AXR.Ref_Scope));
61 Write_Str (")");
63 Write_Str (" Ref_Type = '" & AXR.Rtype & "'");
65 Write_Eol;
66 end Dump;
68 -- Start of processing for dspark
70 begin
71 -- Dump SPARK cross-reference table
73 Write_Eol;
74 Write_Line ("SPARK Xref Table");
75 Write_Line ("----------------");
77 Dump_SPARK_Xrefs;
79 end dspark;
81 end SPARK_Xrefs;