projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
751a449
)
[Support] Timer: simplify the init() method
author
Vedant Kumar
<vsk@apple.com>
Mon, 21 Dec 2015 23:27:44 +0000
(23:27 +0000)
committer
Vedant Kumar
<vsk@apple.com>
Mon, 21 Dec 2015 23:27:44 +0000
(23:27 +0000)
llvm-svn: 256215
llvm/lib/Support/Timer.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/Timer.cpp
b/llvm/lib/Support/Timer.cpp
index
f032ee5
..
c3a385f
100644
(file)
--- 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) {