]> gcc.gnu.org Git - gcc.git/commitdiff
Call release_input_file in claim_file_handler
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 28 Jan 2015 19:39:42 +0000 (19:39 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 28 Jan 2015 19:39:42 +0000 (11:39 -0800)
PR lto/64837
* lto-plugin.c (release_input_file): New.
(claim_file_handler): Call release_input_file.
(onload): Set release_input_file.

From-SVN: r220212

lto-plugin/ChangeLog
lto-plugin/lto-plugin.c

index e8ec05b404110dca06b50a16f3905e8644cc2ad8..c0eae248cbd3bdc1547ab067ee3528b26d8f3e1e 100644 (file)
@@ -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.
index 8d957402ba666922c466679c53af2f4b3d46eff7..8e0a657995822ada990fc2fce7311093200b6839 100644 (file)
@@ -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;
This page took 0.068764 seconds and 5 git commands to generate.