summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCUDA/Inputs/cuda.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCUDA/Inputs/cuda.h')
-rw-r--r--clang/test/SemaCUDA/Inputs/cuda.h4
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__
OpenPOWER on IntegriCloud