Use DenseMap to keep track of last users.
[oota-llvm.git] / include / llvm / Use.h
index 79bcdd177b42e254a3cfd7291140154cacc07ddc..891eaf856579bfef901d6e091f4840adbd2e3184 100644 (file)
@@ -17,7 +17,7 @@
 #define LLVM_USE_H
 
 #include "llvm/Support/Casting.h"
-#include "llvm/ADT/iterator"
+#include "llvm/ADT/iterator.h"
 
 namespace llvm {
 
@@ -66,10 +66,11 @@ inline T *transferTag(const T *From, const T *To) {
 // Use is here to make keeping the "use" list of a Value up-to-date really easy.
 //
 class Use {
-public:
+private:
   /// init - specify Value and User
   /// @deprecated in 2.4, will be removed soon
   inline void init(Value *V, User *U);
+public:
   /// swap - provide a fast substitute to std::swap<Use>
   /// that also works with less standard-compliant compilers
   void swap(Use &RHS);
@@ -93,8 +94,6 @@ private:
                   , fullStopTag = tagThree };
 
 public:
-
-
   operator Value*() const { return Val; }
   Value *get() const { return Val; }
   User *getUser() const;
@@ -191,7 +190,7 @@ public:
     _Self tmp = *this; ++*this; return tmp;
   }
 
-  // Retrieve a reference to the current User
+  // Retrieve a pointer to the current User.
   UserTy *operator*() const {
     assert(U && "Cannot dereference end iterator!");
     return U->getUser();