From 3f79e3259360a1b112b9e5351302e4a6e720d732 Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Mon, 21 Dec 2015 23:27:44 +0000 Subject: [Support] Timer: simplify the init() method llvm-svn: 256215 --- llvm/lib/Support/Timer.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'llvm/lib/Support/Timer.cpp') diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp index f032ee5d30d..c3a385f471f 100644 --- a/llvm/lib/Support/Timer.cpp +++ b/llvm/lib/Support/Timer.cpp @@ -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) { -- cgit v1.2.3