summaryrefslogtreecommitdiff
path: root/include/llvm/Support/Timer.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-07 18:00:37 +0000
committerDan Gohman <gohman@apple.com>2008-07-07 18:00:37 +0000
commit1002c0203450620594a85454c6a095ca94b87cb2 (patch)
tree73e3b798b99c400100672ea206ea1db8eb84af5a /include/llvm/Support/Timer.h
parenteccfb6a16583775f4b2e9bea9566f74934cf02c3 (diff)
downloadllvm-1002c0203450620594a85454c6a095ca94b87cb2.tar.gz
llvm-1002c0203450620594a85454c6a095ca94b87cb2.tar.bz2
llvm-1002c0203450620594a85454c6a095ca94b87cb2.tar.xz
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Timer.h')
-rw-r--r--include/llvm/Support/Timer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/Support/Timer.h b/include/llvm/Support/Timer.h
index 3d3a334d10..4164ddc891 100644
--- a/include/llvm/Support/Timer.h
+++ b/include/llvm/Support/Timer.h
@@ -44,7 +44,7 @@ class Timer {
bool Started; // Has this time variable ever been started?
TimerGroup *TG; // The TimerGroup this Timer is in.
public:
- Timer(const std::string &N);
+ explicit Timer(const std::string &N);
Timer(const std::string &N, TimerGroup &tg);
Timer(const Timer &T);
~Timer();
@@ -116,7 +116,7 @@ class TimeRegion {
Timer &T;
TimeRegion(const TimeRegion &); // DO NOT IMPLEMENT
public:
- TimeRegion(Timer &t) : T(t) {
+ explicit TimeRegion(Timer &t) : T(t) {
T.startTimer();
}
~TimeRegion() {
@@ -131,7 +131,7 @@ public:
/// is primarily used for debugging and for hunting performance problems.
///
struct NamedRegionTimer : public TimeRegion {
- NamedRegionTimer(const std::string &Name);
+ explicit NamedRegionTimer(const std::string &Name);
};
@@ -145,7 +145,7 @@ class TimerGroup {
unsigned NumTimers;
std::vector<Timer> TimersToPrint;
public:
- TimerGroup(const std::string &name) : Name(name), NumTimers(0) {}
+ explicit TimerGroup(const std::string &name) : Name(name), NumTimers(0) {}
~TimerGroup() {
assert(NumTimers == 0 &&
"TimerGroup destroyed before all contained timers!");