[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 28 08:03:08 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() &&
----------------
erichkeane wrote:

yeah, i'm quite sure now that `register..` should just accept/exit early in these cases.

https://github.com/llvm/llvm-project/pull/111389


More information about the cfe-commits mailing list