diff options
author | Justin Lebar <jlebar@google.com> | 2016-01-13 01:07:35 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-01-13 01:07:35 +0000 |
commit | 3eaaf86397a6aee6336bdb101ddcd7bff3f4d37a (patch) | |
tree | 7a82f7588bbb4295c5e518f4cc4676abe1578735 /clang/test/SemaCUDA/Inputs/cuda.h | |
parent | c3340db77d3efc1efba305828926d70aae87ae88 (diff) | |
download | bcm5719-llvm-3eaaf86397a6aee6336bdb101ddcd7bff3f4d37a.tar.gz bcm5719-llvm-3eaaf86397a6aee6336bdb101ddcd7bff3f4d37a.zip |
[CUDA] Report an error if code tries to mix incompatible CUDA attributes.
Summary: Thanks to jhen for helping me figure this out.
Reviewers: tra, echristo
Subscribers: jhen
Differential Revision: http://reviews.llvm.org/D16129
llvm-svn: 257554
Diffstat (limited to 'clang/test/SemaCUDA/Inputs/cuda.h')
-rw-r--r-- | clang/test/SemaCUDA/Inputs/cuda.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaCUDA/Inputs/cuda.h b/clang/test/SemaCUDA/Inputs/cuda.h index a9a4595a14a..18cafdf96af 100644 --- a/clang/test/SemaCUDA/Inputs/cuda.h +++ b/clang/test/SemaCUDA/Inputs/cuda.h @@ -2,6 +2,9 @@ #include <stddef.h> +// Make this file work with nvcc, for testing compatibility. + +#ifndef __NVCC__ #define __constant__ __attribute__((constant)) #define __device__ __attribute__((device)) #define __global__ __attribute__((global)) @@ -18,3 +21,4 @@ typedef struct cudaStream *cudaStream_t; int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0, cudaStream_t stream = 0); +#endif // !__NVCC__ |