[llvm-commits] CVS: llvm/include/llvm/User.h
Chris Lattner
lattner at cs.uiuc.edu
Thu May 29 10:09:01 PDT 2003
Changes in directory llvm/include/llvm:
User.h updated: 1.16 -> 1.17
---
Log message:
Don't require the user to do something like isa<foo>(II->get()). The ->get
should be implicit.
---
Diffs of the changes:
Index: llvm/include/llvm/User.h
diff -u llvm/include/llvm/User.h:1.16 llvm/include/llvm/User.h:1.17
--- llvm/include/llvm/User.h:1.16 Tue Oct 1 18:41:17 2002
+++ llvm/include/llvm/User.h Thu May 29 10:08:33 2003
@@ -73,4 +73,24 @@
}
};
+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
More information about the llvm-commits
mailing list