From 8d352b0a64457a55a61b05306b34ff11826705a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Mon, 27 Aug 2018 19:25:55 +0200 Subject: [PATCH] Register debug_end as an exit function instead --- src/ccache.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/ccache.c b/src/ccache.c index 3cf5d3821..28046a0f8 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -2070,10 +2070,6 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) break; } - if (conf->debug) { - debug_end(); - } - // And exit with the right status code. x_exit(0); } @@ -3385,6 +3381,7 @@ ccache(int argc, char *argv[]) if (conf->debug) { debug_start(output_obj); + exitfn_add_nullary(debug_end); } struct mdfour common_hash; @@ -3470,10 +3467,6 @@ ccache(int argc, char *argv[]) // Run real compiler, sending output to cache. to_cache(compiler_args); - if (conf->debug) { - debug_end(); - } - x_exit(0); } -- 2.47.2