yaxunl marked an inline comment as done. ================ Comment at: lib/CodeGen/CGExprScalar.cpp:1513 @@ -1512,2 +1512,3 @@ // extension. - llvm::Type *MiddleTy = CGF.IntPtrTy; + auto DestLLVMTy = ConvertType(DestTy); + llvm::Type *MiddleTy = CGF.CGM.getDataLayout().getIntPtrType(DestLLVMTy); ---------------- Anastasia wrote: > Did you miss this changes in the original patch then? Yes.
================ Comment at: lib/CodeGen/CGExprScalar.cpp:2447 @@ -2443,3 +2446,3 @@ bool isSigned = indexOperand->getType()->isSignedIntegerOrEnumerationType(); - index = CGF.Builder.CreateIntCast(index, CGF.PtrDiffTy, isSigned, + index = CGF.Builder.CreateIntCast(index, DL.getIntPtrType(PtrTy), isSigned, "idx.ext"); ---------------- Anastasia wrote: > No longer ptrdiff_t? PtrDiffTy and IntPtrTy are members of an anonymous union /// intptr_t, size_t, and ptrdiff_t, which we assume are the same size. union { llvm::IntegerType *IntPtrTy; llvm::IntegerType *SizeTy; llvm::IntegerType *PtrDiffTy; }; so they are actually the same thing. https://reviews.llvm.org/D23361 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits