From patchwork Wed Jan 7 10:24:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 425986 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C35BD1400A0 for ; Wed, 7 Jan 2015 21:25:04 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=U1Ut6CkGGCBflfRg38zHeQ5YU+a906HjW3//32sh1ue+uw3n1c vOckBWzd724f2b6CybIuuWIZr8e7QVGlYN9uNK+lqLJI9SquYyKvV90kL0SvoPda 9cMP5zHV3vsp//2S+G3CyONED/jIC6qZZZIVABMa6UQ/XHrkQfPMp8Z9M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=s/sti6DqNjclkOGUV7SgYZvUWss=; b=dm+gKObi499GkXNl+P4m ypBoCjMS+B7qA6NfsNFuCCX+KT9WPmeiw4JneINDSJjhXLhZDAmdsPEzy7cICq3L j4R5NUPlbyLXh2nTT0cmJYoioMpbY2i8TGwtG/m1X3trGKXLVKr8HzbKU2hKjkBa GdVvLckPs9UR/RKyhpKcZjQ= Received: (qmail 5865 invoked by alias); 7 Jan 2015 10:24:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 5853 invoked by uid 89); 7 Jan 2015 10:24:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 07 Jan 2015 10:24:56 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 818E5116467; Wed, 7 Jan 2015 05:24:54 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tjlcjdxeK0Dr; Wed, 7 Jan 2015 05:24:54 -0500 (EST) Received: from kwai.gnat.com (kwai.gnat.com [IPv6:2620:20:4000:0:7a2b:cbff:fe60:cb11]) by rock.gnat.com (Postfix) with ESMTP id 72522116435; Wed, 7 Jan 2015 05:24:54 -0500 (EST) Received: by kwai.gnat.com (Postfix, from userid 4192) id 6F66B91A7D; Wed, 7 Jan 2015 05:24:54 -0500 (EST) Date: Wed, 7 Jan 2015 05:24:54 -0500 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Johannes Kanig Subject: [Ada] disable some files for SPARK cross references Message-ID: <20150107102454.GA11135@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Some "D" 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. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-01-07 Johannes Kanig * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded cross ref files. Index: lib-xref-spark_specific.adb =================================================================== --- lib-xref-spark_specific.adb (revision 219191) +++ lib-xref-spark_specific.adb (working copy) @@ -889,10 +889,18 @@ 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;