diff options
| author | Dan Gohman <gohman@apple.com> | 2008-07-07 18:00:37 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-07-07 18:00:37 +0000 |
| commit | e887fdff72486ad0e83f402c8c105fa91fff1036 (patch) | |
| tree | 73e3b798b99c400100672ea206ea1db8eb84af5a /include/llvm | |
| parent | 775977b3450a99de8bcb039de2dcc55d614ac176 (diff) | |
| download | external_llvm-e887fdff72486ad0e83f402c8c105fa91fff1036.zip external_llvm-e887fdff72486ad0e83f402c8c105fa91fff1036.tar.gz external_llvm-e887fdff72486ad0e83f402c8c105fa91fff1036.tar.bz2 | |
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')
| -rw-r--r-- | include/llvm/ADT/FoldingSet.h | 8 | ||||
| -rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 2 | ||||
| -rw-r--r-- | include/llvm/Support/Timer.h | 8 | ||||
| -rw-r--r-- | include/llvm/Transforms/Utils/BasicInliner.h | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index cce1eec..7629301 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/include/llvm/ADT/FoldingSet.h @@ -317,7 +317,7 @@ public: template<class T> class FoldingSetIterator : public FoldingSetIteratorImpl { public: - FoldingSetIterator(void **Bucket) : FoldingSetIteratorImpl(Bucket) {} + explicit FoldingSetIterator(void **Bucket) : FoldingSetIteratorImpl(Bucket) {} T &operator*() const { return *static_cast<T*>(NodePtr); @@ -345,7 +345,7 @@ class FoldingSetBucketIteratorImpl { protected: void *Ptr; - FoldingSetBucketIteratorImpl(void **Bucket); + explicit FoldingSetBucketIteratorImpl(void **Bucket); FoldingSetBucketIteratorImpl(void **Bucket, bool) : Ptr(reinterpret_cast<void*>(Bucket)) {} @@ -369,7 +369,7 @@ public: template<class T> class FoldingSetBucketIterator : public FoldingSetBucketIteratorImpl { public: - FoldingSetBucketIterator(void **Bucket) : + explicit FoldingSetBucketIterator(void **Bucket) : FoldingSetBucketIteratorImpl(Bucket) {} FoldingSetBucketIterator(void **Bucket, bool) : @@ -394,7 +394,7 @@ template <typename T> class FoldingSetNodeWrapper : public FoldingSetNode { T data; public: - FoldingSetNodeWrapper(const T& x) : data(x) {} + explicit FoldingSetNodeWrapper(const T& x) : data(x) {} virtual ~FoldingSetNodeWrapper() {} template<typename A1> diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index dff1624..ff2c3ca 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -611,7 +611,7 @@ public: private: friend class LoopInfoBase<BlockT>; - LoopBase(BlockT *BB) : ParentLoop(0) { + explicit LoopBase(BlockT *BB) : ParentLoop(0) { Blocks.push_back(BB); } }; diff --git a/include/llvm/Support/Timer.h b/include/llvm/Support/Timer.h index 3d3a334..4164ddc 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!"); diff --git a/include/llvm/Transforms/Utils/BasicInliner.h b/include/llvm/Transforms/Utils/BasicInliner.h index e2070f9..6a57055 100644 --- a/include/llvm/Transforms/Utils/BasicInliner.h +++ b/include/llvm/Transforms/Utils/BasicInliner.h @@ -30,7 +30,7 @@ namespace llvm { class BasicInliner { public: - BasicInliner(TargetData *T = NULL); + explicit BasicInliner(TargetData *T = NULL); ~BasicInliner(); /// addFunction - Add function into the list of functions to process. |
