Skip to content

Commit ef68b81

Browse files
authored
Merge pull request swiftlang#76722 from slavapestov/fix-rdar136679357
Basic: Fix statistics output in noassert build
2 parents 488581f + aee5852 commit ef68b81

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/Basic/Statistic.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ UnifiedStatsReporter::UnifiedStatsReporter(StringRef ProgramName,
357357
SourceMgr(SM),
358358
ClangSourceMgr(CSM),
359359
RecursiveTimers(std::make_unique<RecursionSafeTimers>()),
360-
IsFlushingTracesAndProfiles(false),
361-
FineGrainedTimers(FineGrainedTimers)
360+
FineGrainedTimers(FineGrainedTimers),
361+
IsFlushingTracesAndProfiles(false)
362362
{
363363
path::append(StatsFilename, makeStatsFileName(ProgramName, AuxName));
364364
path::append(TraceFilename, makeTraceFileName(ProgramName, AuxName));
@@ -458,9 +458,10 @@ UnifiedStatsReporter::printAlwaysOnStatsAndTimers(raw_ostream &OS) {
458458
auto &C = getFrontendCounters();
459459
#define FRONTEND_STATISTIC(TY, NAME) \
460460
do { \
461-
if (C.NAME) \
461+
if (C.NAME) { \
462462
OS << delim << "\t\"" #TY "." #NAME "\": " << C.NAME; \
463-
delim = ",\n"; \
463+
delim = ",\n"; \
464+
} \
464465
} while (0);
465466
#include "swift/Basic/Statistics.def"
466467
#undef FRONTEND_STATISTIC
@@ -469,9 +470,10 @@ UnifiedStatsReporter::printAlwaysOnStatsAndTimers(raw_ostream &OS) {
469470
auto &C = getDriverCounters();
470471
#define DRIVER_STATISTIC(NAME) \
471472
do { \
472-
if (C.NAME) \
473+
if (C.NAME) { \
473474
OS << delim << "\t\"Driver." #NAME "\": " << C.NAME; \
474-
delim = ",\n"; \
475+
delim = ",\n"; \
476+
} \
475477
} while (0);
476478
#include "swift/Basic/Statistics.def"
477479
#undef DRIVER_STATISTIC

0 commit comments

Comments
 (0)