[CUDA] Add implicit __attribute__((used)) to all __global__ functions.
authorArtem Belevich <tra@google.com>
Mon, 10 Aug 2015 20:57:02 +0000 (20:57 +0000)
committerArtem Belevich <tra@google.com>
Mon, 10 Aug 2015 20:57:02 +0000 (20:57 +0000)
commitb7e4aab40cd4eb66c07f496c358a0cc0d716ce34
tree072e0336b260bfe9bbf5d528234057f6a24c4cb7
parenta01ff22bb1ef303107c1ce155be5d03ae82f5080
[CUDA] Add implicit __attribute__((used)) to all __global__ functions.

This allows emitting kernels that were instantiated from the host code
and which would never be explicitly referenced otherwise.

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

llvm-svn: 244501
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CodeGenCUDA/ptx-kernels.cu