aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/ADT/StringMap.h12
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpressions.h6
-rw-r--r--include/llvm/Bitcode/Serialize.h2
3 files changed, 10 insertions, 10 deletions
diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h
index 895d62b1e6..5c47604db4 100644
--- a/include/llvm/ADT/StringMap.h
+++ b/include/llvm/ADT/StringMap.h
@@ -28,7 +28,7 @@ namespace llvm {
class StringMapEntryBase {
unsigned StrLen;
public:
- StringMapEntryBase(unsigned Len) : StrLen(Len) {}
+ explicit StringMapEntryBase(unsigned Len) : StrLen(Len) {}
unsigned getKeyLength() const { return StrLen; }
};
@@ -55,7 +55,7 @@ protected:
unsigned NumTombstones;
unsigned ItemSize;
protected:
- StringMapImpl(unsigned itemSize) : ItemSize(itemSize) {
+ explicit StringMapImpl(unsigned itemSize) : ItemSize(itemSize) {
// Initialize the map with zero buckets to allocation.
TheTable = 0;
NumBuckets = 0;
@@ -115,7 +115,7 @@ template<typename ValueTy>
class StringMapEntry : public StringMapEntryBase {
ValueTy Val;
public:
- StringMapEntry(unsigned StrLen)
+ explicit StringMapEntry(unsigned StrLen)
: StringMapEntryBase(StrLen), Val() {}
StringMapEntry(unsigned StrLen, const ValueTy &V)
: StringMapEntryBase(StrLen), Val(V) {}
@@ -204,7 +204,7 @@ class StringMap : public StringMapImpl {
typedef StringMapEntry<ValueTy> MapEntryTy;
public:
StringMap() : StringMapImpl(sizeof(MapEntryTy)) {}
- StringMap(unsigned InitialSize)
+ explicit StringMap(unsigned InitialSize)
: StringMapImpl(InitialSize, sizeof(MapEntryTy)) {}
AllocatorTy &getAllocator() { return Allocator; }
@@ -314,8 +314,8 @@ class StringMapConstIterator {
protected:
StringMapImpl::ItemBucket *Ptr;
public:
- StringMapConstIterator(StringMapImpl::ItemBucket *Bucket,
- bool NoAdvance = false)
+ explicit StringMapConstIterator(StringMapImpl::ItemBucket *Bucket,
+ bool NoAdvance = false)
: Ptr(Bucket) {
if (!NoAdvance) AdvancePastEmptyBuckets();
}
diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h
index 7fbeff7de0..fb69a90fe7 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpressions.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h
@@ -285,7 +285,7 @@ namespace llvm {
class SCEVAddExpr : public SCEVCommutativeExpr {
friend class ScalarEvolution;
- SCEVAddExpr(const std::vector<SCEVHandle> &ops)
+ explicit SCEVAddExpr(const std::vector<SCEVHandle> &ops)
: SCEVCommutativeExpr(scAddExpr, ops) {
}
@@ -305,7 +305,7 @@ namespace llvm {
class SCEVMulExpr : public SCEVCommutativeExpr {
friend class ScalarEvolution;
- SCEVMulExpr(const std::vector<SCEVHandle> &ops)
+ explicit SCEVMulExpr(const std::vector<SCEVHandle> &ops)
: SCEVCommutativeExpr(scMulExpr, ops) {
}
@@ -468,7 +468,7 @@ namespace llvm {
friend class ScalarEvolution;
Value *V;
- SCEVUnknown(Value *v) : SCEV(scUnknown), V(v) {}
+ explicit SCEVUnknown(Value *v) : SCEV(scUnknown), V(v) {}
protected:
~SCEVUnknown();
diff --git a/include/llvm/Bitcode/Serialize.h b/include/llvm/Bitcode/Serialize.h
index 60d9cb2c99..7b6d8226a0 100644
--- a/include/llvm/Bitcode/Serialize.h
+++ b/include/llvm/Bitcode/Serialize.h
@@ -31,7 +31,7 @@ class Serializer {
MapTy PtrMap;
public:
- Serializer(BitstreamWriter& stream);
+ explicit Serializer(BitstreamWriter& stream);
~Serializer();
template <typename T>