[llvm] r256215 - [Support] Timer: simplify the init() method
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 21 15:27:44 PST 2015
Author: vedantk
Date: Mon Dec 21 17:27:44 2015
New Revision: 256215
URL: http://llvm.org/viewvc/llvm-project?rev=256215&view=rev
Log:
[Support] Timer: simplify the init() method
Modified:
llvm/trunk/lib/Support/Timer.cpp
Modified: llvm/trunk/lib/Support/Timer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Timer.cpp?rev=256215&r1=256214&r2=256215&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Timer.cpp (original)
+++ llvm/trunk/lib/Support/Timer.cpp Mon Dec 21 17:27:44 2015
@@ -96,11 +96,7 @@ static TimerGroup *getDefaultTimerGroup(
//===----------------------------------------------------------------------===//
void Timer::init(StringRef N) {
- assert(!TG && "Timer already initialized");
- Name.assign(N.begin(), N.end());
- Started = false;
- TG = getDefaultTimerGroup();
- TG->addTimer(*this);
+ init(N, *getDefaultTimerGroup());
}
void Timer::init(StringRef N, TimerGroup &tg) {
More information about the llvm-commits
mailing list