[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

Aniket Lal via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 19 01:24:54 PDT 2025


================
@@ -6127,6 +6133,12 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType,
 
   const auto *FnType = cast<FunctionType>(PointeeType);
 
+  if (auto FD = dyn_cast_or_null<FunctionDecl>(TargetDecl)) {
+    if (FD->hasAttr<OpenCLKernelAttr>()) {
+      CGM.getTargetCodeGenInfo().setOCLKernelStubCallingConvention(FnType);
+    }
+  }
----------------
lalaniket8 wrote:

Fixed

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


More information about the cfe-commits mailing list