Lines Matching defs:NewTy
235 Type *NewTy = cast<PointerType>(Ptr->getType())->getElementType();
238 // from NewTy to Val's type must be legal. If it's not, we can try
239 // introspecting NewTy to find a legal conversion.
240 while (!Val->getType()->canLosslesslyBitCastTo(NewTy)) {
241 // If NewTy is a struct, we can convert the pointer to the struct
244 if (StructType *STy = dyn_cast<StructType>(NewTy)) {
245 NewTy = STy->getTypeAtIndex(0U);
247 IntegerType *IdxTy = IntegerType::get(NewTy->getContext(), 32);
255 // If we can't improve the situation by introspecting NewTy,
266 Val = ConstantExpr::getBitCast(Val, NewTy);