Home | History | Annotate | Download | only in Support

Lines Matching defs:isa

10 // This file defines the isa<X>(), cast<X>(), dyn_cast<X>(), cast_or_null<X>(),
27 // isa<x> Support Templates
53 // The core of the implementation of isa<X> is here; To and From should be
55 // implementation of isa<> without rewriting it from scratch.
85 assert(Val && "isa<> used on a null pointer");
92 assert(Val && "isa<> used on a null pointer");
99 assert(Val && "isa<> used on a null pointer");
106 assert(Val && "isa<> used on a null pointer");
113 assert(Val && "isa<> used on a null pointer");
137 // isa<X> - Return true if the parameter to the template is an instance of the
140 // if (isa<Type>(myVal)) { ... }
142 template <class X, class Y> LLVM_NODISCARD inline bool isa(const Y &Val) {
241 assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
248 assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
255 assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
263 assert(isa<X>(Val.get()) && "cast<Ty>() argument of incompatible type!");
280 assert(isa<X>(Val) && "cast_or_null<Ty>() argument of incompatible type!");
291 assert(isa<X>(Val) && "cast_or_null<Ty>() argument of incompatible type!");
299 assert(isa<X>(Val) && "cast_or_null<Ty>() argument of incompatible type!");
324 return isa<X>(Val) ? cast<X>(Val) : nullptr;
329 return isa<X>(Val) ? cast<X>(Val) : nullptr;
334 return isa<X>(Val) ? cast<X>(Val) : nullptr;
345 return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
353 return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
359 return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
363 // taking ownership of the input pointer iff isa<X>(Val) is true. If the
370 if (!isa<X>(Val))