Add explicit keywords.
authorDan Gohman <gohman@apple.com>
Mon, 29 Oct 2007 19:52:04 +0000 (19:52 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 29 Oct 2007 19:52:04 +0000 (19:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43464 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/AliasSetTracker.h
lib/Analysis/ValueNumbering.cpp
lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp

index cd6450fac82656fdb25fea45adac615691ccdedf..3aafb80af801ec4ded288b2c6d270e1ba1109bcb 100644 (file)
@@ -164,7 +164,7 @@ public:
   class iterator : public forward_iterator<HashNodePair, ptrdiff_t> {
     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
index bdb9422c238a5ed83809e755f3cae2762d830ab3..8665acdb46f9b8fbe0031485c4ba783d44154b75 100644 (file)
@@ -78,7 +78,7 @@ namespace {
   ///
   struct VISIBILITY_HIDDEN BVNImpl : public InstVisitor<BVNImpl> {
     std::vector<Value*> &RetVals;
-    BVNImpl(std::vector<Value*> &RV) : RetVals(RV) {}
+    explicit BVNImpl(std::vector<Value*> &RV) : RetVals(RV) {}
 
     void visitCastInst(CastInst &I);
     void visitGetElementPtrInst(GetElementPtrInst &I);
index e8bf080c1f6cc8ee43ef54711b7544649e8c9cf8..4180455a2bc1391b7ec8db5fc905755e16763273 100644 (file)
@@ -99,7 +99,7 @@ class VISIBILITY_HIDDEN DAGTypeLegalizer {
   SmallVector<SDNode*, 128> Worklist;
   
 public:
-  DAGTypeLegalizer(SelectionDAG &dag)
+  explicit DAGTypeLegalizer(SelectionDAG &dag)
     : TLI(dag.getTargetLoweringInfo()), DAG(dag),
     ValueTypeActions(TLI.getValueTypeActions()) {
     assert(MVT::LAST_VALUETYPE <= 32 &&