Commit 4932ce96 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Try to regain gcov for tests which panic.

parent 364932ec
......@@ -63,6 +63,10 @@
*
*/
#ifdef GCOVING
int __llvm_profile_write_file(void);
#endif
static struct vsb pan_vsb_storage, *pan_vsb;
static pthread_mutex_t panicstr_mtx;
......@@ -811,6 +815,9 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
VSB_cat(pan_vsb, "\n");
VSB_putc(pan_vsb, '\0'); /* NUL termination */
#ifdef GCOVING
__llvm_profile_write_file();
#endif
abort();
}
......
......@@ -63,6 +63,10 @@ static const struct cli_cmd_desc *cmds[] = {
#include "tbl/cli_cmds.h"
};
#ifdef GCOVING
int __llvm_profile_write_file(void);
#endif
static const int ncmds = sizeof cmds / sizeof cmds[0];
static int cli_i = -1, cli_o = -1;
......@@ -108,6 +112,9 @@ mcf_panic(struct cli *cli, const char * const *av, void *priv)
(void)cli;
(void)av;
(void)priv;
#ifdef GCOVING
__llvm_profile_write_file();
#endif
AZ(strcmp("", "You asked for it"));
/* NOTREACHED */
abort();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment