diff options
author | Artem Belevich <tra@google.com> | 2019-01-31 21:34:03 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2019-01-31 21:34:03 +0000 |
commit | c62214da3de04f702e29e4ba4772c9463e2829ca (patch) | |
tree | 3b37c00552d8dcef2f88e1ec999796dd5798406e /clang/lib/Sema/SemaDecl.cpp | |
parent | 8fa28a0db058eb53970f7eca3aaf71c86357e478 (diff) | |
download | bcm5719-llvm-c62214da3de04f702e29e4ba4772c9463e2829ca.tar.gz bcm5719-llvm-c62214da3de04f702e29e4ba4772c9463e2829ca.zip |
[CUDA] add support for the new kernel launch API in CUDA-9.2+.
Instead of calling CUDA runtime to arrange function arguments,
the new API constructs arguments in a local array and the kernels
are launched with __cudaLaunchKernel().
The old API has been deprecated and is expected to go away
in the next CUDA release.
Differential Revision: https://reviews.llvm.org/D57488
llvm-svn: 352799
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 38a73302e8c..112184d87d9 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -9146,13 +9146,12 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, if (getLangOpts().CUDA) { IdentifierInfo *II = NewFD->getIdentifier(); - if (II && - II->isStr(getLangOpts().HIP ? "hipConfigureCall" - : "cudaConfigureCall") && + if (II && II->isStr(getCudaConfigureFuncName()) && !NewFD->isInvalidDecl() && NewFD->getDeclContext()->getRedeclContext()->isTranslationUnit()) { if (!R->getAs<FunctionType>()->getReturnType()->isScalarType()) - Diag(NewFD->getLocation(), diag::err_config_scalar_return); + Diag(NewFD->getLocation(), diag::err_config_scalar_return) + << getCudaConfigureFuncName(); Context.setcudaConfigureCallDecl(NewFD); } |