Skip to content

Commit 4831dc7

Browse files
committed
Set PrintOnExit to true by default in the other constructor
1 parent 9cb7902 commit 4831dc7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

llvm/include/llvm/Support/Timer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ class TimerGroup {
219219
bool PrintOnExit = true);
220220

221221
LLVM_ABI explicit TimerGroup(StringRef Name, StringRef Description,
222-
const StringMap<TimeRecord> &Records);
222+
const StringMap<TimeRecord> &Records,
223+
bool PrintOnExit = true);
223224

224225
LLVM_ABI ~TimerGroup();
225226

llvm/lib/Support/Timer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ TimerGroup::TimerGroup(StringRef Name, StringRef Description, bool PrintOnExit)
288288
: TimerGroup(Name, Description, timerLock(), PrintOnExit) {}
289289

290290
TimerGroup::TimerGroup(StringRef Name, StringRef Description,
291-
const StringMap<TimeRecord> &Records)
292-
: TimerGroup(Name, Description, /*PrintOnExit=*/false) {
291+
const StringMap<TimeRecord> &Records, bool PrintOnExit)
292+
: TimerGroup(Name, Description, PrintOnExit) {
293293
TimersToPrint.reserve(Records.size());
294294
for (const auto &P : Records)
295295
TimersToPrint.emplace_back(P.getValue(), std::string(P.getKey()),

0 commit comments

Comments
 (0)