Add explicit keywords.
[oota-llvm.git] / include / llvm / Analysis / AliasSetTracker.h
index 082d89910b84e5a2df8d3f6ab0c46e49c8b7d07f..3aafb80af801ec4ded288b2c6d270e1ba1109bcb 100644 (file)
@@ -18,6 +18,7 @@
 #define LLVM_ANALYSIS_ALIASSETTRACKER_H
 
 #include "llvm/Support/CallSite.h"
+#include "llvm/Support/Streams.h"
 #include "llvm/ADT/iterator"
 #include "llvm/ADT/hash_map"
 #include "llvm/ADT/ilist"
@@ -156,13 +157,14 @@ public:
   bool empty() const { return PtrList == 0; }
 
   void print(std::ostream &OS) const;
+  void print(std::ostream *OS) const { if (OS) print(*OS); }
   void dump() const;
 
   /// Define an iterator for alias sets... this is just a forward iterator.
   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;
@@ -260,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
@@ -354,6 +356,7 @@ public:
   iterator end()   { return AliasSets.end(); }
 
   void print(std::ostream &OS) const;
+  void print(std::ostream *OS) const { if (OS) print(*OS); }
   void dump() const;
 
 private: