[PATCH] D60454: [OpenCL] Prevent mangling kernel functions
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 9 04:47:36 PDT 2019
Anastasia created this revision.
Anastasia added reviewers: rjmccall, bader.
Herald added subscribers: ebevhan, yaxunl.
Kernel function names have to be preserved as in the original source to be able to access them from the host API side.
This patch adds restriction to kernels that prevents them to be used in overloading, templates, etc. This is implemented by enclosing the kernels implicitly into C linkage clause. Therefore all C linkage restrictions will apply to the kernels.
https://reviews.llvm.org/D60454
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
test/CodeGenOpenCLCXX/addrspace-of-this.cl
test/CodeGenOpenCLCXX/local_addrspace_init.cl
test/SemaOpenCLCXX/kernel_invalid.cl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60454.194291.patch
Type: text/x-patch
Size: 9571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190409/72a3b7da/attachment-0001.bin>
More information about the cfe-commits
mailing list