[all-commits] [llvm/llvm-project] be86b6: [CUDA] Allow local static variables with target at...
Artem Belevich via All-commits
all-commits at lists.llvm.org
Tue Nov 3 10:31:26 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: be86b6773b6ba4d101a848e109540548181d2ed5
https://github.com/llvm/llvm-project/commit/be86b6773b6ba4d101a848e109540548181d2ed5
Author: Artem Belevich <tra at google.com>
Date: 2020-11-03 (Tue, 03 Nov 2020)
Changed paths:
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaCUDA.cpp
M clang/lib/Sema/SemaDecl.cpp
M clang/lib/Sema/SemaDeclAttr.cpp
M clang/test/CodeGenCUDA/static-device-var-no-rdc.cu
M clang/test/SemaCUDA/bad-attributes.cu
M clang/test/SemaCUDA/device-var-init.cu
Log Message:
-----------
[CUDA] Allow local static variables with target attributes.
While CUDA documentation claims that such variables are not allowed[1], NVCC has
been accepting them since CUDA-10.0[2] and some headers in CUDA-11 rely on this
working.
1. https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#static-variables-function
2. https://godbolt.org/z/zsodzc
Differential Revision: https://reviews.llvm.org/D88345
More information about the All-commits
mailing list