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) {
456
456
const char *delim = " " ;
457
457
if (FrontendCounters) {
458
458
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 " ; \
463
464
} while (0 );
464
465
#include " swift/Basic/Statistics.def"
465
466
#undef FRONTEND_STATISTIC
466
467
}
467
468
if (DriverCounters) {
468
469
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 " ; \
473
475
} while (0 );
474
476
#include " swift/Basic/Statistics.def"
475
477
#undef DRIVER_STATISTIC
You can’t perform that action at this time.
0 commit comments