summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2015-09-23 17:44:53 +0000
committerArtem Belevich <tra@google.com>2015-09-23 17:44:53 +0000
commit7b41f70e6c323615d54ce5058220214c46279add (patch)
tree85f22f8bd0309eef236e376142df8bc1f6e4fb0c /clang/lib/Sema/SemaDeclAttr.cpp
parentade3abd2d9fa3465718cb4baeaf535de39fa6161 (diff)
downloadbcm5719-llvm-7b41f70e6c323615d54ce5058220214c46279add.tar.gz
bcm5719-llvm-7b41f70e6c323615d54ce5058220214c46279add.zip
[CUDA] __global__ functions should always be visible externally.
Adjust __global__ functions with DiscardableODR linkage to use StrongODR linkage instead, so they are visible externally. Differential Revision: http://reviews.llvm.org/D13067 llvm-svn: 248400
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index ddf189ae12c..9cc082152bb 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -3351,9 +3351,6 @@ static void handleGlobalAttr(Sema &S, Decl *D, const AttributeList &Attr) {
CUDAGlobalAttr(Attr.getRange(), S.Context,
Attr.getAttributeSpellingListIndex()));
- // Add implicit attribute((used)) so we don't eliminate kernels
- // because there is nothing referencing them on device side.
- D->addAttr(UsedAttr::CreateImplicit(S.Context));
}
static void handleGNUInlineAttr(Sema &S, Decl *D, const AttributeList &Attr) {
OpenPOWER on IntegriCloud