bool rc;
if (!gcov) {
-#ifdef __GNUC__
+#if defined(__clang__)
+ cmd = "llvm-cov gcov";
+#elif defined(__GNUC__)
cmd = "gcov";
#endif
}
args = tal_vfmt(ctx, fmt, ap);
rc = run_command(ctx, time_ms, output, "%s %s", cmd, args);
tal_free(args);
+ va_end(ap);
return rc;
}