From 9962054775455c43402bf176da4a28c68197feef Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 29 Oct 2007 19:52:04 +0000 Subject: Add explicit keywords. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43464 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/AliasSetTracker.h | 4 ++-- lib/Analysis/ValueNumbering.cpp | 2 +- lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index cd6450fac8..3aafb80af8 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -164,7 +164,7 @@ public: class iterator : public forward_iterator { HashNodePair *CurNode; public: - iterator(HashNodePair *CN = 0) : CurNode(CN) {} + explicit iterator(HashNodePair *CN = 0) : CurNode(CN) {} bool operator==(const iterator& x) const { return CurNode == x.CurNode; @@ -262,7 +262,7 @@ public: /// AliasSetTracker ctor - Create an empty collection of AliasSets, and use /// the specified alias analysis object to disambiguate load and store /// addresses. - AliasSetTracker(AliasAnalysis &aa) : AA(aa) {} + explicit AliasSetTracker(AliasAnalysis &aa) : AA(aa) {} /// add methods - These methods are used to add different types of /// instructions to the alias sets. Adding a new instruction can result in diff --git a/lib/Analysis/ValueNumbering.cpp b/lib/Analysis/ValueNumbering.cpp index bdb9422c23..8665acdb46 100644 --- a/lib/Analysis/ValueNumbering.cpp +++ b/lib/Analysis/ValueNumbering.cpp @@ -78,7 +78,7 @@ namespace { /// struct VISIBILITY_HIDDEN BVNImpl : public InstVisitor { std::vector &RetVals; - BVNImpl(std::vector &RV) : RetVals(RV) {} + explicit BVNImpl(std::vector &RV) : RetVals(RV) {} void visitCastInst(CastInst &I); void visitGetElementPtrInst(GetElementPtrInst &I); diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp index e8bf080c1f..4180455a2b 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp @@ -99,7 +99,7 @@ class VISIBILITY_HIDDEN DAGTypeLegalizer { SmallVector Worklist; public: - DAGTypeLegalizer(SelectionDAG &dag) + explicit DAGTypeLegalizer(SelectionDAG &dag) : TLI(dag.getTargetLoweringInfo()), DAG(dag), ValueTypeActions(TLI.getValueTypeActions()) { assert(MVT::LAST_VALUETYPE <= 32 && -- cgit v1.2.3