Teach InheritingConcreteTypeLoc to play nicely with dyn_cast.

llvm-svn: 111916
This commit is contained in:
Douglas Gregor 2010-08-24 15:53:44 +00:00
parent 9846fae3c3
commit cd87859346
1 changed files with 4 additions and 0 deletions

View File

@ -341,6 +341,10 @@ private:
template <class Base, class Derived, class TypeClass>
class InheritingConcreteTypeLoc : public Base {
public:
static bool classofType(const Type *Ty) {
return TypeClass::classof(Ty);
}
static bool classof(const TypeLoc *TL) {
return Derived::classofType(TL->getTypePtr());
}