diff options
Diffstat (limited to 'include/llvm/Support/Timer.h')
-rw-r--r-- | include/llvm/Support/Timer.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/llvm/Support/Timer.h b/include/llvm/Support/Timer.h index 1d4b080..c5b921c 100644 --- a/include/llvm/Support/Timer.h +++ b/include/llvm/Support/Timer.h @@ -164,12 +164,12 @@ class TimerGroup { std::string Name; Timer *FirstTimer; // First timer in the group. std::vector<std::pair<TimeRecord, std::string> > TimersToPrint; + + TimerGroup **Prev, *Next; // Doubly linked list of TimerGroup's. TimerGroup(const TimerGroup &TG); // DO NOT IMPLEMENT void operator=(const TimerGroup &TG); // DO NOT IMPLEMENT public: - explicit TimerGroup(const std::string &name = "") - : Name(name), FirstTimer(0) {} - + explicit TimerGroup(const std::string &name); ~TimerGroup(); void setName(const std::string &name) { Name = name; } @@ -177,6 +177,9 @@ public: /// print - Print any started timers in this group and zero them. void print(raw_ostream &OS); + /// printAll - This static method prints all timers and clears them all out. + static void printAll(raw_ostream &OS); + private: friend class Timer; void addTimer(Timer &T); |