From patchwork Sun Sep 19 13:57:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 65162 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]) by ozlabs.org (Postfix) with SMTP id 00E41B70CE for ; Mon, 20 Sep 2010 00:04:26 +1000 (EST) Received: (qmail 13747 invoked by alias); 19 Sep 2010 14:04:24 -0000 Received: (qmail 13738 invoked by uid 22791); 19 Sep 2010 14:04:23 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 19 Sep 2010 14:04:19 +0000 Received: from eggs.gnu.org ([140.186.70.92]:41249) by fencepost.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1OxKV7-0007mX-BP for gcc-patches@gnu.org; Sun, 19 Sep 2010 10:04:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxKV6-0008LY-5B for gcc-patches@gnu.org; Sun, 19 Sep 2010 10:04:17 -0400 Received: from mel.act-europe.fr ([212.99.106.210]:38301) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxKV6-0008LL-01 for gcc-patches@gnu.org; Sun, 19 Sep 2010 10:04:16 -0400 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 8E751CB01FC for ; Sun, 19 Sep 2010 16:04:14 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Otcl2lnyEkHT for ; Sun, 19 Sep 2010 16:04:14 +0200 (CEST) Received: from [192.168.1.2] (bon31-9-83-155-120-49.fbx.proxad.net [83.155.120.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 69221CB01BA for ; Sun, 19 Sep 2010 16:04:14 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gnu.org Subject: [Ada] Avoid generating duplicate debug info for enumerators Date: Sun, 19 Sep 2010 15:57:34 +0200 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Message-Id: <201009191557.34320.ebotcazou@adacore.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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 This prevents the compiler from generating duplicate debug information for enumerators, first for the definition of the enumeration type and then for the individual constants themselves. Tested on i586-suse-linux, applied on the mainline and 4.5 branch. 2010-09-19 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Do not generate debug info for individual enumerators. Index: gcc-interface/decl.c =================================================================== --- gcc-interface/decl.c (revision 164417) +++ gcc-interface/decl.c (working copy) @@ -1525,7 +1525,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entit = create_var_decl (get_entity_name (gnat_literal), NULL_TREE, gnu_type, gnu_value, true, false, false, false, NULL, gnat_literal); - + /* Do not generate debug info for individual enumerators. */ + DECL_IGNORED_P (gnu_literal) = 1; save_gnu_tree (gnat_literal, gnu_literal, false); gnu_literal_list = tree_cons (DECL_NAME (gnu_literal), gnu_value, gnu_literal_list);