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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 06:27:03 PDT 2024


================
@@ -14296,6 +14296,31 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
   }
 }
 
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+                                          CanQualType KernelNameType,
+                                          const FunctionDecl *FD) {
+  return { KernelNameType, FD };
+}
+
+void ASTContext::registerSYCLEntryPointFunction(FunctionDecl *FD) {
+  assert(!FD->isInvalidDecl());
+  assert(!FD->isDependentContext());
----------------
erichkeane wrote:

Again, no idea how I missed this... Github seems to hide comments from me at a certain point.  

I think that was probably true.  As a nit, we check this with `isTemplated` IIRC, but I don't have a good idea of when this and `isDependentContext` would differ, so I don't think there is anything to do here? 

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


More information about the cfe-commits mailing list