X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FUser.h;h=df303d0dd5f289e24accff8608da0dd1b486d868;hb=b02ed5b8eafd11500bbefb7206ecbf5bc3fc324a;hp=8b1895d4698839ee63cab1ce9643e69fc9315210;hpb=e9c6f98b1ea7261ba2d49f4d038670c0dfe14467;p=oota-llvm.git diff --git a/include/llvm/User.h b/include/llvm/User.h index 8b1895d4698..df303d0dd5f 100644 --- a/include/llvm/User.h +++ b/include/llvm/User.h @@ -118,6 +118,8 @@ public: inline op_iterator op_end() { return OperandList+NumOperands; } inline const_op_iterator op_end() const { return OperandList+NumOperands; } + /// Convenience iterator for directly iterating over the Values in the + /// OperandList class value_op_iterator : public std::iterator { op_iterator OI; @@ -131,7 +133,7 @@ public: return !operator==(x); } - // Iterator traversal: forward iteration only + /// Iterator traversal: forward iteration only value_op_iterator &operator++() { // Preincrement ++OI; return *this; @@ -140,7 +142,7 @@ public: value_op_iterator tmp = *this; ++*this; return tmp; } - // Retrieve a pointer to the current User. + /// Retrieve a pointer to the current Value. Value *operator*() const { return *OI; } @@ -174,7 +176,6 @@ public: void replaceUsesOfWith(Value *From, Value *To); // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const User *) { return true; } static inline bool classof(const Value *V) { return isa(V) || isa(V); }