[CUDA] Make printf work.
Summary:
The code in CGCUDACall is largely based on a patch written by Eli
Bendersky:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20140324/210218.html
That patch implemented an LLVM pass lowering printf to vprintf; this
one does something similar, but in Clang codegen.
Reviewers: echristo
Subscribers: cfe-commits, jhen, tra, majnemer
Differential Revision: http://reviews.llvm.org/D16372
llvm-svn: 258642
diff --git a/clang/test/CodeGenCUDA/Inputs/cuda.h b/clang/test/CodeGenCUDA/Inputs/cuda.h
index a9a4595..9b9f43a 100644
--- a/clang/test/CodeGenCUDA/Inputs/cuda.h
+++ b/clang/test/CodeGenCUDA/Inputs/cuda.h
@@ -18,3 +18,5 @@
int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
cudaStream_t stream = 0);
+
+extern "C" __device__ int printf(const char*, ...);