From f0afa50b6c6d3c24d1d423e05b85c75701271710 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 29 May 2003 15:08:33 +0000 Subject: [PATCH] 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 --- include/llvm/User.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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 -- 2.50.1