rnk added inline comments.

================
Comment at: lib/CodeGen/CGCUDABuiltin.cpp:105
@@ -99,3 +104,3 @@
       llvm::Value *P = Builder.CreateStructGEP(AllocaTy, Alloca, I - 1);
       llvm::Value *Arg = Args[I].RV.getScalarVal();
       Builder.CreateAlignedStore(Arg, P, 
DL.getPrefTypeAlignment(Arg->getType()));
----------------
rnk wrote:
> I assume this is what's asserting. Probably this code should do something 
> like:
>   if (Args[I].RV.isScalar()) {
>     Arg = Args[I].RV.getScalarVal();
>   } else {
>     ErrorUnsupported(E, "non-scalar variadic argument");
>     Arg = CGM.getNullValue(...);
>   }
Under the assumption that the implementation of vprintf expects an old-school 
va_list byte array, then it's probably easier to implement this behavior rather 
than try to diagnose it. All you have to do is memcpy the bytes of the 
aggregate.

You also might want to handle _Complex values.


http://reviews.llvm.org/D17103



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

Reply via email to