summaryrefslogtreecommitdiff
path: root/lto-plugin
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-16 14:06:40 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-16 14:06:40 +0000
commit53c700125d82424a52e14ef6038327593801584b (patch)
treefb5687ae05b694fef337d0bb25951f46257c331f /lto-plugin
parent4b83e1601201ef046f95a0a29d4893f165fbffb3 (diff)
downloadgcc-53c700125d82424a52e14ef6038327593801584b.tar.gz
Delete temporary output files.
2010-03-16 Dmitry Gorbachev <d.g.gorbachev@gmail.com> PR lto/43336 * lto-plugin.c (cleanup_handler): Delete temporary output files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157483 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/ChangeLog5
-rw-r--r--lto-plugin/lto-plugin.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index 9336ac92555..ccb61654e7c 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-16 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
+
+ PR lto/43336
+ * lto-plugin.c (cleanup_handler): Delete temporary output files.
+
2010-01-11 Richard Guenther <rguenther@suse.de>
PR lto/41569
diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c
index 2fb4f2a7782..97b7c0fdfec 100644
--- a/lto-plugin/lto-plugin.c
+++ b/lto-plugin/lto-plugin.c
@@ -524,6 +524,7 @@ all_symbols_read_handler (void)
static enum ld_plugin_status
cleanup_handler (void)
{
+ unsigned int i;
int t;
if (debug)
@@ -541,6 +542,12 @@ cleanup_handler (void)
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;
}