[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 1 15:55:03 PDT 2024
================
@@ -1155,6 +1155,15 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) {
for (unsigned I = 0; I != NumParams; ++I)
Params.push_back(readDeclAs<ParmVarDecl>());
FD->setParams(Reader.getContext(), Params);
+
+ // If the declaration is a SYCL kernel entry point function as indicated by
+ // the presence of a sycl_kernel_entry_point attribute, register it so that
+ // associated metadata is recreated.
+ if (!FD->isInvalidDecl() && !FD->isDependentContext() &&
----------------
tahonermann wrote:
I went ahead and made the change to silently skip the registration for invalid or dependent function declarations and removed the corresponding checks at call sights. It isn't my preference, but I decided I don't feel strongly about it. Resolving this conversation.
https://github.com/llvm/llvm-project/pull/111389
More information about the cfe-commits
mailing list