diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp | 8 |
3 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 0bacf0fe70e..aa78e7c4dc0 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -123,7 +123,7 @@ namespace { void operator=(const ConstantPlaceHolder &); // DO NOT IMPLEMENT public: Use Op; - ConstantPlaceHolder(const Type *Ty) + explicit ConstantPlaceHolder(const Type *Ty) : ConstantExpr(Ty, Instruction::UserOp1, &Op, 1), Op(UndefValue::get(Type::Int32Ty), this) { } diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp index 8de7ffb2db2..57512045e03 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp @@ -20,7 +20,8 @@ namespace { std::ostream &Out; // ostream to print on public: static char ID; // Pass identifcation, replacement for typeid - WriteBitcodePass(std::ostream &o) : ModulePass((intptr_t) &ID), Out(o) {} + explicit WriteBitcodePass(std::ostream &o) + : ModulePass((intptr_t) &ID), Out(o) {} const char *getPassName() const { return "Bitcode Writer"; } diff --git a/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp b/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp index 6933fab3cf4..42c4055ae67 100644 --- a/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp @@ -57,7 +57,7 @@ namespace { Value *Val; // Relation to what value? unsigned Rel; // SetCC or ICmp relation, or Add if no information public: - Relation(Value *V) : Val(V), Rel(Instruction::Add) {} + explicit Relation(Value *V) : Val(V), Rel(Instruction::Add) {} bool operator<(const Relation &R) const { return Val < R.Val; } Value *getValue() const { return Val; } unsigned getRelation() const { return Rel; } @@ -112,7 +112,7 @@ namespace { // Value *Replacement; public: - ValueInfo(const Type *Ty) + explicit ValueInfo(const Type *Ty) : Bounds(Ty->isInteger() ? cast<IntegerType>(Ty)->getBitWidth() : 32), Replacement(0) {} @@ -146,7 +146,7 @@ namespace { return *I; // Insert and return the new relationship... - return *Relationships.insert(I, V); + return *Relationships.insert(I, Relation(V)); } const Relation *requestRelation(Value *V) const { @@ -176,7 +176,7 @@ namespace { typedef std::map<Value*, ValueInfo> ValueMapTy; ValueMapTy ValueMap; public: - RegionInfo(BasicBlock *bb) : BB(bb) {} + explicit RegionInfo(BasicBlock *bb) : BB(bb) {} // getEntryBlock - Return the block that dominates all of the members of // this region. |