summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-01-23 21:28:10 +0000
committerJustin Lebar <jlebar@google.com>2016-01-23 21:28:10 +0000
commita8f0254bc1a4bdb3061d033cb5b9a3997bfc9a98 (patch)
tree49f66d3f4fc63f7d6dffa8ba62d14d6252c3bfd6 /clang/lib/Sema/SemaDeclAttr.cpp
parentb2db45065c75fa728f7a8470dda4873bde59aede (diff)
downloadbcm5719-llvm-a8f0254bc1a4bdb3061d033cb5b9a3997bfc9a98.tar.gz
bcm5719-llvm-a8f0254bc1a4bdb3061d033cb5b9a3997bfc9a98.zip
[CUDA] Reject the alias attribute in CUDA device code.
Summary: CUDA (well, strictly speaking, NVPTX) doesn't support aliases. Reviewers: echristo Subscribers: cfe-commits, jhen, tra Differential Revision: http://reviews.llvm.org/D16502 llvm-svn: 258641
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index e0ce3adce42..b0a9a009f0f 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -1557,6 +1557,9 @@ static void handleAliasAttr(Sema &S, Decl *D, const AttributeList &Attr) {
S.Diag(Attr.getLoc(), diag::err_alias_not_supported_on_darwin);
return;
}
+ if (S.Context.getTargetInfo().getTriple().isNVPTX()) {
+ S.Diag(Attr.getLoc(), diag::err_alias_not_supported_on_nvptx);
+ }
// Aliases should be on declarations, not definitions.
if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
OpenPOWER on IntegriCloud