From 0179e977234fef45b1877eb93a3c7565cdd1862d Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 30 Mar 2010 18:05:52 +0000 Subject: Switch isa_impl from a function template to a class template with a static inline member function doit(). This enables the use of partial specialization to override the last stage of the "isa" check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99898 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Type.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/llvm/Type.h') diff --git a/include/llvm/Type.h b/include/llvm/Type.h index d09913a1df..df3a16c592 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -548,9 +548,11 @@ template <> struct GraphTraits { } }; -template <> inline bool isa_impl(const Type &Ty) { - return Ty.getTypeID() == Type::PointerTyID; -} +template <> struct isa_impl { + static inline bool doit(const Type &Ty) { + return Ty.getTypeID() == Type::PointerTyID; + } +}; raw_ostream &operator<<(raw_ostream &OS, const Type &T); -- cgit v1.2.3