From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9368 invoked by alias); 28 Jan 2015 19:19:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 9339 invoked by uid 89); 28 Jan 2015 19:19:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f180.google.com Received: from mail-wi0-f180.google.com (HELO mail-wi0-f180.google.com) (209.85.212.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 28 Jan 2015 19:19:50 +0000 Received: by mail-wi0-f180.google.com with SMTP id h11so14151531wiw.1 for ; Wed, 28 Jan 2015 11:19:47 -0800 (PST) X-Received: by 10.194.59.234 with SMTP id c10mr10675867wjr.49.1422472787644; Wed, 28 Jan 2015 11:19:47 -0800 (PST) Received: from android-4c5a376a18c0e957.fritz.box (p5B0E4FA1.dip0.t-ipconnect.de. [91.14.79.161]) by mx.google.com with ESMTPSA id dp8sm4018702wib.20.2015.01.28.11.19.45 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Jan 2015 11:19:46 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: <20150128181242.GA4350@intel.com> References: <20150128181242.GA4350@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: PR lto/64837: lto plugin doesn't call ld_plugin_release_input_file From: Richard Biener Date: Wed, 28 Jan 2015 19:57:00 -0000 To: "H.J. Lu" ,"H.J. Lu" ,gcc-patches@gcc.gnu.org Message-ID: X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg02527.txt.bz2 On January 28, 2015 7:12:43 PM CET, "H.J. Lu" wrote: >Hi, > >This patch makes claim_file_handler to call release_input_file after it >finishes processing input file. OK for trunk? OK. How did you test this? Thanks, Richard. >Thanks. > > >H.J. >--- >diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog >index e8ec05b..c0eae24 100644 >--- a/lto-plugin/ChangeLog >+++ b/lto-plugin/ChangeLog >@@ -1,3 +1,10 @@ >+2015-01-28 H.J. Lu >+ >+ PR lto/64837 >+ * lto-plugin.c (release_input_file): New. >+ (claim_file_handler): Call release_input_file. >+ (onload): Set release_input_file. >+ > 2014-12-09 Ilya Verbin > > * lto-plugin.c (offload_files, num_offload_files): New static >variables. >diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c >index 8d957402..8e0a657 100644 >--- a/lto-plugin/lto-plugin.c >+++ b/lto-plugin/lto-plugin.c >@@ -145,6 +145,7 @@ static ld_plugin_register_all_symbols_read >register_all_symbols_read; > static ld_plugin_get_symbols get_symbols, get_symbols_v2; > static ld_plugin_register_cleanup register_cleanup; > static ld_plugin_add_input_file add_input_file; >+static ld_plugin_release_input_file release_input_file; > static ld_plugin_add_input_library add_input_library; > static ld_plugin_message message; > static ld_plugin_add_symbols add_symbols; >@@ -1006,6 +1007,8 @@ claim_file_handler (const struct >ld_plugin_input_file *file, int *claimed) > if (obj.objfile) > simple_object_release_read (obj.objfile); > >+ release_input_file (file); >+ > return LDPS_OK; > } > >@@ -1091,6 +1094,9 @@ onload (struct ld_plugin_tv *tv) > case LDPT_ADD_INPUT_FILE: > add_input_file = p->tv_u.tv_add_input_file; > break; >+ case LDPT_RELEASE_INPUT_FILE: >+ release_input_file = p->tv_u.tv_release_input_file; >+ break; > case LDPT_ADD_INPUT_LIBRARY: > add_input_library = p->tv_u.tv_add_input_library; > break;