diff options
-rw-r--r-- | include/llvm/User.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/llvm/User.h b/include/llvm/User.h index e9dea8bcbf..ce68c410e6 100644 --- a/include/llvm/User.h +++ b/include/llvm/User.h @@ -73,4 +73,24 @@ public: } }; +template<> struct simplify_type<User::op_iterator> { + typedef Value* SimpleType; + + static SimpleType getSimplifiedValue(const User::op_iterator &Val) { + return (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 (SimpleType)Val->get(); + } +}; +template<> struct simplify_type<const User::const_op_iterator> + : public simplify_type<User::const_op_iterator> {}; + #endif |