Lines Matching defs:DstTy
1697 Constant *ConstantExpr::getPtrToInt(Constant *C, Type *DstTy) {
1700 assert(DstTy->getScalarType()->isIntegerTy() &&
1702 assert(isa<VectorType>(C->getType()) == isa<VectorType>(DstTy));
1704 assert(C->getType()->getVectorNumElements()==DstTy->getVectorNumElements()&&
1706 return getFoldedCast(Instruction::PtrToInt, C, DstTy);
1709 Constant *ConstantExpr::getIntToPtr(Constant *C, Type *DstTy) {
1712 assert(DstTy->getScalarType()->isPointerTy() &&
1714 assert(isa<VectorType>(C->getType()) == isa<VectorType>(DstTy));
1716 assert(C->getType()->getVectorNumElements()==DstTy->getVectorNumElements()&&
1718 return getFoldedCast(Instruction::IntToPtr, C, DstTy);
1721 Constant *ConstantExpr::getBitCast(Constant *C, Type *DstTy) {
1722 assert(CastInst::castIsValid(Instruction::BitCast, C, DstTy) &&
1727 if (C->getType() == DstTy) return C;
1729 return getFoldedCast(Instruction::BitCast, C, DstTy);
1732 Constant *ConstantExpr::getAddrSpaceCast(Constant *C, Type *DstTy) {
1733 assert(CastInst::castIsValid(Instruction::AddrSpaceCast, C, DstTy) &&
1739 PointerType *DstScalarTy = cast<PointerType>(DstTy->getScalarType());
1743 if (VectorType *VT = dyn_cast<VectorType>(DstTy)) {
1749 return getFoldedCast(Instruction::AddrSpaceCast, C, DstTy);