diff options
author | Justin Lebar <jlebar@google.com> | 2016-01-23 21:28:10 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-01-23 21:28:10 +0000 |
commit | a8f0254bc1a4bdb3061d033cb5b9a3997bfc9a98 (patch) | |
tree | 49f66d3f4fc63f7d6dffa8ba62d14d6252c3bfd6 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | b2db45065c75fa728f7a8470dda4873bde59aede (diff) | |
download | bcm5719-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.cpp | 3 |
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)) { |