diff options
author | Justin Lebar <jlebar@google.com> | 2016-01-23 21:28:14 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-01-23 21:28:14 +0000 |
commit | 3039a593db6f013c374d25b715a56e6098bfe17f (patch) | |
tree | ca83ab20af1fc04b6c6cf0c4f62b32ab5f1ef0ad /clang/test/CodeGenCUDA/Inputs/cuda.h | |
parent | a8f0254bc1a4bdb3061d033cb5b9a3997bfc9a98 (diff) | |
download | bcm5719-llvm-3039a593db6f013c374d25b715a56e6098bfe17f.tar.gz bcm5719-llvm-3039a593db6f013c374d25b715a56e6098bfe17f.zip |
[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
Diffstat (limited to 'clang/test/CodeGenCUDA/Inputs/cuda.h')
-rw-r--r-- | clang/test/CodeGenCUDA/Inputs/cuda.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/CodeGenCUDA/Inputs/cuda.h b/clang/test/CodeGenCUDA/Inputs/cuda.h index a9a4595a14a..9b9f43a1aaa 100644 --- a/clang/test/CodeGenCUDA/Inputs/cuda.h +++ b/clang/test/CodeGenCUDA/Inputs/cuda.h @@ -18,3 +18,5 @@ typedef struct cudaStream *cudaStream_t; int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0, cudaStream_t stream = 0); + +extern "C" __device__ int printf(const char*, ...); |