Don't require the user to do something like isa<foo>(II->get()). The ->get

should be implicit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6395 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-05-29 15:08:33 +00:00
parent 1ff1da7ac9
commit f0afa50b6c

View File

@ -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