aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohannes Kanig <kanig@adacore.com>2015-01-07 10:24:46 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2015-01-07 11:24:46 +0100
commitccfe725bc63fb3e3f279f1995a13b8b585bd6468 (patch)
treea651ab6a8910f0eadaa57857ed162d057cb3de14 /gcc
parented09416ff9ab07e5491373e9af15563b0a0def34 (diff)
downloadgcc-ccfe725bc63fb3e3f279f1995a13b8b585bd6468.zip
gcc-ccfe725bc63fb3e3f279f1995a13b8b585bd6468.tar.gz
gcc-ccfe725bc63fb3e3f279f1995a13b8b585bd6468.tar.bz2
lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded cross ref files.
2015-01-07 Johannes Kanig <kanig@adacore.com> * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded cross ref files. From-SVN: r219292
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/lib-xref-spark_specific.adb16
2 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index a422194..526bf38 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-07 Johannes Kanig <kanig@adacore.com>
+
+ * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
+ cross ref files.
+
2015-01-07 Robert Dewar <dewar@adacore.com>
* s-taprop-linux.adb, clean.adb: Minor reformatting.
diff --git a/gcc/ada/lib-xref-spark_specific.adb b/gcc/ada/lib-xref-spark_specific.adb
index 28677060..b38d65b 100644
--- a/gcc/ada/lib-xref-spark_specific.adb
+++ b/gcc/ada/lib-xref-spark_specific.adb
@@ -889,10 +889,18 @@ package body SPARK_Specific is
D2 := D1;
end if;
- Add_SPARK_File
- (Ubody => Sdep_Table (D1),
- Uspec => Sdep_Table (D2),
- Dspec => D2);
+ -- Some files do not correspond to Ada units, and as such present no
+ -- interest for SPARK cross references. Skip these files, as printing
+ -- their name may require printing the full name with spaces, which
+ -- is not handled in the code doing I/O of SPARK cross references.
+
+ if Present (Cunit_Entity (Sdep_Table (D1))) then
+ Add_SPARK_File
+ (Ubody => Sdep_Table (D1),
+ Uspec => Sdep_Table (D2),
+ Dspec => D2);
+ end if;
+
D1 := D2 + 1;
end loop;