summaryrefslogtreecommitdiff
path: root/include/llvm/Use.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-07-23 08:53:17 +0000
committerEric Christopher <echristo@apple.com>2010-07-23 08:53:17 +0000
commit6252f6ea11a05d6e4c340e7dd26e37daa29c5cc1 (patch)
tree3bee55ca8c40125f9451ce55d30de44559904e0e /include/llvm/Use.h
parent4a3bb24179b3f0c0daa6a8f10a3f43721895c499 (diff)
downloadllvm-6252f6ea11a05d6e4c340e7dd26e37daa29c5cc1.tar.gz
llvm-6252f6ea11a05d6e4c340e7dd26e37daa29c5cc1.tar.bz2
llvm-6252f6ea11a05d6e4c340e7dd26e37daa29c5cc1.tar.xz
Revert 109220.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Use.h')
-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