[PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 10 17:57:11 PST 2016


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm


================
Comment at: lib/CodeGen/CGCUDABuiltin.cpp:90
@@ +89,3 @@
+    CGM.ErrorUnsupported(E, "non-scalar arg to printf");
+    return RValue::getIgnored();
+  }
----------------
Doesn't printf return int? Maybe return RValue::get(llvm::ConstantInt::get(IntTy, 0))?


http://reviews.llvm.org/D17103





More information about the cfe-commits mailing list