[PATCH] D36847: [Support] Add reentrant start/stop Timer methods
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 22 13:14:10 PDT 2017
MatzeB added a comment.
FWIF: Looking at https://reviews.llvm.org/D36946 I'm not convinced yet that timer is a good idea there at all.
================
Comment at: include/llvm/Support/Timer.h:83
bool Triggered; ///< Has the timer ever been triggered?
+ unsigned RefCount = 0; ///< Number of times started without being stopped.
TimerGroup *TG = nullptr; ///< The TimerGroup this Timer is in.
----------------
Maybe this should be called `StartCount` instead of `RefCount`? It should be possible to get rid of the `Running` member at that point and check `StartCount > 0` instead.
https://reviews.llvm.org/D36847
More information about the llvm-commits
mailing list