aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-03-25 22:06:05 +0000
committerDan Gohman <gohman@apple.com>2008-03-25 22:06:05 +0000
commit950a4c40b823cd4f09dc71be635229246dfd6cac (patch)
treeff52517c682e08112a66247bc8b85f81664f72b3 /include/llvm
parentcfbb2f074da2842e42956d3b4c21e91b37f36f06 (diff)
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48801 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/ADT/SmallPtrSet.h7
-rw-r--r--include/llvm/Analysis/Dominators.h4
-rw-r--r--include/llvm/ModuleProvider.h2
-rw-r--r--include/llvm/Use.h2
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;