diff --git a/include/llvm/Use.h b/include/llvm/Use.h index d36e66fe06a..eeff52fcb6a 100644 --- a/include/llvm/Use.h +++ b/include/llvm/Use.h @@ -132,7 +132,7 @@ public: } // Retrieve a reference to the current SCC - UserTy *operator*() const { + UserTy *operator*() const { assert(U && "Cannot increment end iterator!"); return U->getUser(); } @@ -142,6 +142,30 @@ public: Use &getUse() const { return *U; } }; + +template<> struct simplify_type > { + typedef User* SimpleType; + + static SimpleType getSimplifiedValue(const value_use_iterator &Val) { + return *Val; + } +}; + +template<> struct simplify_type > + : public simplify_type > {}; + +template<> struct simplify_type > { + typedef const User* SimpleType; + + static SimpleType getSimplifiedValue(const + value_use_iterator &Val) { + return *Val; + } +}; + +template<> struct simplify_type > + : public simplify_type > {}; + } // End llvm namespace #endif