aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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 e1ebc6a..2759338 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