From: Chris Lattner Date: Thu, 29 May 2003 15:08:33 +0000 (+0000) Subject: Don't require the user to do something like isa(II->get()). The ->get X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f0afa50b6c6d3c24d1d423e05b85c75701271710;p=oota-llvm.git Don't require the user to do something like isa(II->get()). The ->get should be implicit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6395 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/User.h b/include/llvm/User.h index e9dea8bcbff..ce68c410e67 100644 --- a/include/llvm/User.h +++ b/include/llvm/User.h @@ -73,4 +73,24 @@ public: } }; +template<> struct simplify_type { + typedef Value* SimpleType; + + static SimpleType getSimplifiedValue(const User::op_iterator &Val) { + return (SimpleType)Val->get(); + } +}; +template<> struct simplify_type + : public simplify_type {}; + +template<> struct simplify_type { + typedef Value* SimpleType; + + static SimpleType getSimplifiedValue(const User::const_op_iterator &Val) { + return (SimpleType)Val->get(); + } +}; +template<> struct simplify_type + : public simplify_type {}; + #endif