yaxunl marked an inline comment as done.
yaxunl added a comment.

BTW Michael Liao will create another patch which will supersede this patch. 
That patch contains similar changes and also handles pointers in a byval struct 
or array.



================
Comment at: clang/lib/CodeGen/CGCall.cpp:1172
     if (isa<llvm::PointerType>(Ty))
-      return CGF.Builder.CreateBitCast(Val, Ty, "coerce.val");
+      return CGF.Builder.CreatePointerCast(Val, Ty, "coerce.val");
 
----------------
tra wrote:
> What's the purpose of this change?
this is supposed to cast the coerced type to the original type. Previously, no 
coerced type changes the address space, therefore a bitcast is sufficient. Now 
we coerce a type to different address space, therefore we need a pointer cast.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69818/new/

https://reviews.llvm.org/D69818



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

Reply via email to