forked from OSchip/llvm-project
Teach InheritingConcreteTypeLoc to play nicely with dyn_cast.
llvm-svn: 111916
This commit is contained in:
parent
9846fae3c3
commit
cd87859346
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue