summaryrefslogtreecommitdiff
path: root/lto-plugin
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-28 19:39:42 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-28 19:39:42 +0000
commit16cd1159a4d3713ba87db1c8b9b669caa9231613 (patch)
tree0033ff81adcb41da7c64b714defccd66cf8d984d /lto-plugin
parent9c08fbb35aa95420268c2762151f22a6a9b90e85 (diff)
Call release_input_file in claim_file_handler
PR lto/64837 * lto-plugin.c (release_input_file): New. (claim_file_handler): Call release_input_file. (onload): Set release_input_file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220212 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/ChangeLog7
-rw-r--r--lto-plugin/lto-plugin.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index e8ec05b40411..c0eae248cbd3 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -1,3 +1,10 @@
+2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ 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 <ilya.verbin@intel.com>
* 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 8d957402ba66..8e0a65799582 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;