+
+ // 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<Instruction>(V) || isa<Constant>(V);
+ }
+};
+
+template<> struct simplify_type<User::op_iterator> {
+ typedef Value* SimpleType;
+
+ static SimpleType getSimplifiedValue(const User::op_iterator &Val) {
+ return static_cast<SimpleType>(Val->get());
+ }
+};
+
+template<> struct simplify_type<const User::op_iterator>
+ : public simplify_type<User::op_iterator> {};
+
+template<> struct simplify_type<User::const_op_iterator> {
+ typedef Value* SimpleType;
+
+ static SimpleType getSimplifiedValue(const User::const_op_iterator &Val) {
+ return static_cast<SimpleType>(Val->get());
+ }