diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/SmallPtrSet.h | 7 | ||||
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 4 | ||||
-rw-r--r-- | include/llvm/ModuleProvider.h | 2 | ||||
-rw-r--r-- | include/llvm/Use.h | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h index e165d14557..8b85a67afb 100644 --- a/include/llvm/ADT/SmallPtrSet.h +++ b/include/llvm/ADT/SmallPtrSet.h @@ -57,7 +57,7 @@ protected: // Helper to copy construct a SmallPtrSet. SmallPtrSetImpl(const SmallPtrSetImpl& that); public: - SmallPtrSetImpl(unsigned SmallSize) { + explicit SmallPtrSetImpl(unsigned SmallSize) { assert(SmallSize && (SmallSize & (SmallSize-1)) == 0 && "Initial size must be a power of two!"); CurArray = &SmallArray[0]; @@ -140,7 +140,7 @@ class SmallPtrSetIteratorImpl { protected: const void *const *Bucket; public: - SmallPtrSetIteratorImpl(const void *const *BP) : Bucket(BP) { + explicit SmallPtrSetIteratorImpl(const void *const *BP) : Bucket(BP) { AdvanceIfNotValid(); } @@ -166,7 +166,8 @@ protected: template<typename PtrTy> class SmallPtrSetIterator : public SmallPtrSetIteratorImpl { public: - SmallPtrSetIterator(const void *const *BP) : SmallPtrSetIteratorImpl(BP) {} + explicit SmallPtrSetIterator(const void *const *BP) + : SmallPtrSetIteratorImpl(BP) {} // Most methods provided by baseclass. diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 80088fd6c6..8d333de6b0 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -48,7 +48,7 @@ class DominatorBase { protected: std::vector<NodeT*> Roots; const bool IsPostDominators; - inline DominatorBase(bool isPostDom) : + inline explicit DominatorBase(bool isPostDom) : Roots(), IsPostDominators(isPostDom) {} public: @@ -294,7 +294,7 @@ protected: } public: - DominatorTreeBase(bool isPostDom) + explicit DominatorTreeBase(bool isPostDom) : DominatorBase<NodeT>(isPostDom), DFSInfoValid(false), SlowQueries(0) {} virtual ~DominatorTreeBase() { reset(); } diff --git a/include/llvm/ModuleProvider.h b/include/llvm/ModuleProvider.h index 17ff6b242d..65bcc763f1 100644 --- a/include/llvm/ModuleProvider.h +++ b/include/llvm/ModuleProvider.h @@ -74,7 +74,7 @@ public: /// if we just have a Module. Note that the ModuleProvider takes ownership of /// the Module specified. struct ExistingModuleProvider : public ModuleProvider { - ExistingModuleProvider(Module *M) { + explicit ExistingModuleProvider(Module *M) { TheModule = M; } bool materializeFunction(Function *F, std::string *ErrInfo = 0) { diff --git a/include/llvm/Use.h b/include/llvm/Use.h index c81a903e8b..48384f29ac 100644 --- a/include/llvm/Use.h +++ b/include/llvm/Use.h @@ -107,7 +107,7 @@ class value_use_iterator : public forward_iterator<UserTy*, ptrdiff_t> { typedef value_use_iterator<UserTy> _Self; Use *U; - value_use_iterator(Use *u) : U(u) {} + explicit value_use_iterator(Use *u) : U(u) {} friend class Value; public: typedef typename super::reference reference; |