[llvm-commits] [llvm] r43464 - in /llvm/trunk: include/llvm/Analysis/AliasSetTracker.h lib/Analysis/ValueNumbering.cpp lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp

Dan Gohman djg at cray.com
Mon Oct 29 12:52:04 PDT 2007


Author: djg
Date: Mon Oct 29 14:52:04 2007
New Revision: 43464

URL: http://llvm.org/viewvc/llvm-project?rev=43464&view=rev
Log:
Add explicit keywords.

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

Modified: llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/AliasSetTracker.h?rev=43464&r1=43463&r2=43464&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/AliasSetTracker.h (original)
+++ llvm/trunk/include/llvm/Analysis/AliasSetTracker.h Mon Oct 29 14:52:04 2007
@@ -164,7 +164,7 @@
   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 @@
   /// 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

Modified: llvm/trunk/lib/Analysis/ValueNumbering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueNumbering.cpp?rev=43464&r1=43463&r2=43464&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/ValueNumbering.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueNumbering.cpp Mon Oct 29 14:52:04 2007
@@ -78,7 +78,7 @@
   ///
   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);

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp?rev=43464&r1=43463&r2=43464&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp Mon Oct 29 14:52:04 2007
@@ -99,7 +99,7 @@
   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 &&





More information about the llvm-commits mailing list