Lines Matching defs:DestTy
516 static Value *createCast(IRBuilder<> &Builder, Value *V, Type *DestTy) {
519 assert(DestTy->isStructTy());
520 assert(SrcTy->getStructNumElements() == DestTy->getStructNumElements());
521 Value *Result = PoisonValue::get(DestTy);
525 DestTy->getStructElementType(I));
531 assert(!DestTy->isStructTy());
532 if (SrcTy->isIntegerTy() && DestTy->isPointerTy())
533 return Builder.CreateIntToPtr(V, DestTy);
534 else if (SrcTy->isPointerTy() && DestTy->isIntegerTy())
535 return Builder.CreatePtrToInt(V, DestTy);
537 return Builder.CreateBitCast(V, DestTy);