1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- S P A R K _ X R E F S --
9 -- Copyright (C) 2011-2023, Free Software Foundation, Inc. --
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. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
27 with Output
; use Output
;
28 with Sem_Util
; use Sem_Util
;
30 package body SPARK_Xrefs
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
);
47 procedure Dump
(Index
: Nat
; AXR
: SPARK_Xref_Record
) is
53 Write_Str
(" Entity = " & Unique_Name
(AXR
.Entity
));
55 Write_Int
(Nat
(AXR
.Entity
));
58 Write_Str
(" Scope = " & Unique_Name
(AXR
.Ref_Scope
));
60 Write_Int
(Nat
(AXR
.Ref_Scope
));
63 Write_Str
(" Ref_Type = '" & AXR
.Rtype
& "'");
68 -- Start of processing for dspark
71 -- Dump SPARK cross-reference table
74 Write_Line
("SPARK Xref Table");
75 Write_Line
("----------------");