Lines Matching refs:Val

36   static SimpleType &getSimplifiedValue(From &Val) { return Val; }
45 static RetType getSimplifiedValue(const From& Val) {
46 return simplify_type<From>::getSimplifiedValue(const_cast<From&>(Val));
55 static inline bool doit(const From &Val) {
56 return To::classof(&Val);
68 static inline bool doit(const From &Val) {
69 return isa_impl<To, From>::doit(Val);
74 static inline bool doit(const From &Val) {
75 return isa_impl<To, From>::doit(Val);
80 static inline bool doit(const From *Val) {
81 assert(Val && "isa<> used on a null pointer");
82 return isa_impl<To, From>::doit(*Val);
87 static inline bool doit(const From *Val) {
88 assert(Val && "isa<> used on a null pointer");
89 return isa_impl<To, From>::doit(*Val);
94 static inline bool doit(const From *Val) {
95 assert(Val && "isa<> used on a null pointer");
96 return isa_impl<To, From>::doit(*Val);
101 static inline bool doit(const From *Val) {
102 assert(Val && "isa<> used on a null pointer");
103 return isa_impl<To, From>::doit(*Val);
111 static bool doit(const From &Val) {
114 simplify_type<const From>::getSimplifiedValue(Val));
121 static bool doit(const FromTy &Val) {
122 return isa_impl_cl<To,FromTy>::doit(Val);
132 LLVM_ATTRIBUTE_UNUSED_RESULT inline bool isa(const Y &Val) {
134 typename simplify_type<const Y>::SimpleType>::doit(Val);
191 static typename cast_retty<To, From>::ret_type doit(From &Val) {
194 simplify_type<From>::getSimplifiedValue(Val));
200 static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
202 = (typename cast_retty<To, FromTy>::ret_type)const_cast<FromTy&>(Val);
222 cast(const Y &Val) {
223 assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
225 X, const Y, typename simplify_type<const Y>::SimpleType>::doit(Val);
229 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
230 assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
232 typename simplify_type<Y>::SimpleType>::doit(Val);
236 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
237 assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
239 typename simplify_type<Y*>::SimpleType>::doit(Val);
247 cast_or_null(Y *Val) {
248 if (!Val) return nullptr;
249 assert(isa<X>(Val) && "cast_or_null<Ty>() argument of incompatible type!");
250 return cast<X>(Val);
265 dyn_cast(const Y &Val) {
266 return isa<X>(Val) ? cast<X>(Val) : nullptr;
271 dyn_cast(Y &Val) {
272 return isa<X>(Val) ? cast<X>(Val) : nullptr;
277 dyn_cast(Y *Val) {
278 return isa<X>(Val) ? cast<X>(Val) : nullptr;
286 dyn_cast_or_null(Y *Val) {
287 return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;