From 334535132f43f1376e3f3f4bf79e72e86e7d8bac Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Wed, 23 Mar 2016 22:42:27 +0000 Subject: [PATCH] [CUDA] Don't define __NVCC__. Summary: We decided this makes life too difficult for code authors. For example, people may want to detect NVCC and disable variadic templates, which NVCC does not support, but which we do. Since people are going to have to change compiler flags *anyway* in order to compile with clang, if they really want the old behavior, they can pass -D__NVCC__. Tested with tensorflow and thrust, no apparent problems. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18417 llvm-svn: 264205 --- clang/lib/Headers/__clang_cuda_runtime_wrapper.h | 1 - 1 file changed, 1 deletion(-) diff --git a/clang/lib/Headers/__clang_cuda_runtime_wrapper.h b/clang/lib/Headers/__clang_cuda_runtime_wrapper.h index 8753a8c..95d1f5f 100644 --- a/clang/lib/Headers/__clang_cuda_runtime_wrapper.h +++ b/clang/lib/Headers/__clang_cuda_runtime_wrapper.h @@ -199,7 +199,6 @@ static inline __device__ void __brkpt(int __c) { __brkpt(); } // Set up compiler macros expected to be seen during compilation. #undef __CUDABE__ #define __CUDACC__ -#define __NVCC__ #if defined(__CUDA_ARCH__) // We need to emit IR declaration for non-existing __nvvm_reflect() to -- 2.7.4