From: Anders F Björklund Date: Mon, 27 Aug 2018 17:25:55 +0000 (+0200) Subject: Register debug_end as an exit function instead X-Git-Tag: v3.5~34^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d352b0a64457a55a61b05306b34ff11826705a4;p=thirdparty%2Fccache.git Register debug_end as an exit function instead --- 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); }