[Support] Timer: simplify the init() method
[oota-llvm.git] / lib / Support / Timer.cpp
index f032ee5d30d04ef06f8b510574eee17daeddc4cc..c3a385f471f9d12953d383648d3049c98e99479c 100644 (file)
@@ -96,11 +96,7 @@ static TimerGroup *getDefaultTimerGroup() {
 //===----------------------------------------------------------------------===//
 
 void Timer::init(StringRef N) {
 //===----------------------------------------------------------------------===//
 
 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) {
 }
 
 void Timer::init(StringRef N, TimerGroup &tg) {