This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR 43336


2010-03-12  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>

	PR 43336
	* lto-plugin.c (cleanup_handler): Delete temporary output files.

--- lto-plugin/lto-plugin.c
+++ lto-plugin/lto-plugin.c
@@ -523,8 +523,9 @@

 static enum ld_plugin_status
 cleanup_handler (void)
 {
+  unsigned int i;
   int t;

   if (debug)
     return LDPS_OK;
@@ -540,8 +541,14 @@
       t = unlink (resolution_file);
       check (t == 0, LDPL_FATAL, "could not unlink resolution file");
     }

+  for (i = 0; i < num_output_files; i++)
+    {
+      t = unlink (output_files[i]);
+      check (t == 0, LDPL_FATAL, "could not unlink output file");
+    }
+
   free_2 ();
   return LDPS_OK;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]