rjmccall added inline comments.

================
Comment at: cfe/trunk/lib/CodeGen/CGCall.cpp:1238
+  Address Casted = CGF.Builder.CreateBitCast(Tmp, CGF.AllocaInt8PtrTy);
+  Address SrcCasted = CGF.Builder.CreateBitCast(Src, CGF.AllocaInt8PtrTy);
   CGF.Builder.CreateMemCpy(Casted, SrcCasted,
----------------
There is a CreateElementBitCast method on CGBuilderTy that preserves the source 
address space; that seems like the obviously correct fix here instead of 
assuming any specific address space on either operand.


================
Comment at: cfe/trunk/lib/CodeGen/CGCall.cpp:1320
+    Address Casted = CGF.Builder.CreateBitCast(Tmp, CGF.AllocaInt8PtrTy);
+    Address DstCasted = CGF.Builder.CreateBitCast(Dst, CGF.AllocaInt8PtrTy);
     CGF.Builder.CreateMemCpy(DstCasted, Casted,
----------------
Same.


Repository:
  rL LLVM

https://reviews.llvm.org/D40806



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to