]> granicus.if.org Git - clang/commitdiff
[CUDA] removed unneeded __nvvm_reflect_anchor()
authorArtem Belevich <tra@google.com>
Thu, 21 Apr 2016 21:40:27 +0000 (21:40 +0000)
committerArtem Belevich <tra@google.com>
Thu, 21 Apr 2016 21:40:27 +0000 (21:40 +0000)
Since r265060 LLVM infers correct __nvvm_reflect attributes, so
explicit declaration of __nvvm_reflect() is no longer needed.

Differential Revision: http://reviews.llvm.org/D19074

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267062 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/__clang_cuda_runtime_wrapper.h

index 4b0fd9692126c9104253d027fb9da6d49bbde00b..4ad240ff1d69fc1344c5aa1b8f51352b4851d6c9 100644 (file)
@@ -216,16 +216,6 @@ static inline __device__ void __brkpt(int __c) { __brkpt(); }
 #undef __CUDABE__
 #define __CUDACC__
 
-#if defined(__CUDA_ARCH__)
-// We need to emit IR declaration for non-existing __nvvm_reflect() to
-// let backend know that it should be treated as const nothrow
-// function which is what NVVMReflect pass expects to see.
-extern "C" __device__ __attribute__((const)) int __nvvm_reflect(const void *);
-static __device__ __attribute__((used)) int __nvvm_reflect_anchor() {
-  return __nvvm_reflect("NONE");
-}
-#endif
-
 extern "C" {
 // Device-side CUDA system calls.
 // http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls