File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -456,20 +456,22 @@ UnifiedStatsReporter::printAlwaysOnStatsAndTimers(raw_ostream &OS) {
456456 const char *delim = " " ;
457457 if (FrontendCounters) {
458458 auto &C = getFrontendCounters ();
459- #define FRONTEND_STATISTIC (TY, NAME ) \
460- do { \
461- OS << delim << " \t\" " #TY " ." #NAME " \" : " << C.NAME ; \
462- delim = " ,\n " ; \
459+ #define FRONTEND_STATISTIC (TY, NAME ) \
460+ do { \
461+ if (C.NAME ) \
462+ OS << delim << " \t\" " #TY " ." #NAME " \" : " << C.NAME ; \
463+ delim = " ,\n " ; \
463464 } while (0 );
464465#include " swift/Basic/Statistics.def"
465466#undef FRONTEND_STATISTIC
466467 }
467468 if (DriverCounters) {
468469 auto &C = getDriverCounters ();
469- #define DRIVER_STATISTIC (NAME ) \
470- do { \
471- OS << delim << " \t\" Driver." #NAME " \" : " << C.NAME ; \
472- delim = " ,\n " ; \
470+ #define DRIVER_STATISTIC (NAME ) \
471+ do { \
472+ if (C.NAME ) \
473+ OS << delim << " \t\" Driver." #NAME " \" : " << C.NAME ; \
474+ delim = " ,\n " ; \
473475 } while (0 );
474476#include " swift/Basic/Statistics.def"
475477#undef DRIVER_STATISTIC
You can’t perform that action at this time.
0 commit comments