summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Use.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/llvm/Use.h b/include/llvm/Use.h
index e1ebc6a51b..2759338f42 100644
--- a/include/llvm/Use.h
+++ b/include/llvm/Use.h
@@ -210,6 +210,30 @@ public:
unsigned getOperandNo() const;
};
+
+template<> struct simplify_type<value_use_iterator<User> > {
+ typedef User* SimpleType;
+
+ static SimpleType getSimplifiedValue(const value_use_iterator<User> &Val) {
+ return *Val;
+ }
+};
+
+template<> struct simplify_type<const value_use_iterator<User> >
+ : public simplify_type<value_use_iterator<User> > {};
+
+template<> struct simplify_type<value_use_iterator<const User> > {
+ typedef const User* SimpleType;
+
+ static SimpleType getSimplifiedValue(const
+ value_use_iterator<const User> &Val) {
+ return *Val;
+ }
+};
+
+template<> struct simplify_type<const value_use_iterator<const User> >
+ : public simplify_type<value_use_iterator<const User> > {};
+
} // End llvm namespace
#endif