Lines Matching defs:DstTy
103 Value *EmitConversionToBool(Value *Src, QualType DstTy);
109 QualType DstType, llvm::Type *DstTy);
113 Value *EmitScalarConversion(Value *Src, QualType SrcTy, QualType DstTy);
119 QualType SrcTy, QualType DstTy);
552 llvm::Type *DstTy) {
594 if (isa<llvm::IntegerType>(DstTy)) {
678 llvm::Type *DstTy = ConvertType(DstType);
681 if (SrcTy == DstTy)
687 if (isa<llvm::PointerType>(DstTy)) {
690 return Builder.CreateBitCast(Src, DstTy, "conv");
700 return Builder.CreateIntToPtr(IntResult, DstTy, "conv");
705 assert(isa<llvm::IntegerType>(DstTy) && "not ptr->int?");
706 return Builder.CreatePtrToInt(Src, DstTy, "conv");
716 unsigned NumElements = cast<llvm::VectorType>(DstTy)->getNumElements();
722 isa<llvm::VectorType>(DstTy))
723 return Builder.CreateBitCast(Src, DstTy, "conv");
727 llvm::Type *ResTy = DstTy;
734 DstTy);
738 DstTy = CGF.FloatTy;
742 if (isa<llvm::IntegerType>(DstTy))
743 Res = Builder.CreateIntCast(Src, DstTy, InputSigned, "conv");
745 Res = Builder.CreateSIToFP(Src, DstTy, "conv");
747 Res = Builder.CreateUIToFP(Src, DstTy, "conv");
748 } else if (isa<llvm::IntegerType>(DstTy)) {
751 Res = Builder.CreateFPToSI(Src, DstTy, "conv");
753 Res = Builder.CreateFPToUI(Src, DstTy, "conv");
755 assert(SrcTy->isFloatingPointTy() && DstTy->isFloatingPointTy() &&
757 if (DstTy->getTypeID() < SrcTy->getTypeID())
758 Res = Builder.CreateFPTrunc(Src, DstTy, "conv");
760 Res = Builder.CreateFPExt(Src, DstTy, "conv");
763 if (DstTy != ResTy) {
776 QualType SrcTy, QualType DstTy) {
781 if (DstTy->isBooleanType()) {
783 Src.first = EmitScalarConversion(Src.first, SrcTy, DstTy);
784 Src.second = EmitScalarConversion(Src.second, SrcTy, DstTy);
792 return EmitScalarConversion(Src.first, SrcTy, DstTy);
1359 llvm::Type *DstTy = ConvertType(DestTy);
1365 unsigned NumElements = cast<llvm::VectorType>(DstTy)->getNumElements();
3105 llvm::Type *DstTy = ConvertType(E->getType());
3110 if (isa<llvm::VectorType>(DstTy) && isa<llvm::VectorType>(SrcTy)) {
3111 unsigned numElementsDst = cast<llvm::VectorType>(DstTy)->getNumElements();
3122 cast<llvm::VectorType>(DstTy)->getElementType();
3149 return Builder.CreateBitCast(Src, DstTy, "astype");
3178 QualType DstTy) {
3179 assert(hasScalarEvaluationKind(SrcTy) && hasScalarEvaluationKind(DstTy) &&
3181 return ScalarExprEmitter(*this).EmitScalarConversion(Src, SrcTy, DstTy);
3189 QualType DstTy) {
3190 assert(SrcTy->isAnyComplexType() && hasScalarEvaluationKind(DstTy) &&
3193 DstTy);