================ @@ -5692,7 +5692,10 @@ CGCallee CodeGenFunction::EmitCallee(const Expr *E) { // Resolve direct calls. } else if (auto DRE = dyn_cast<DeclRefExpr>(E)) { if (auto FD = dyn_cast<FunctionDecl>(DRE->getDecl())) { - return EmitDirectCallee(*this, FD); + auto CalleeDecl = FD->hasAttr<OpenCLKernelAttr>() + ? GlobalDecl(FD, KernelReferenceKind::Stub) + : FD; + return EmitDirectCallee(*this, CalleeDecl); ---------------- lalaniket8 wrote:
I see, I can get the correct CalleePtr which is of type `llvm::Constant`, but I am not able to figure out how to convert the same into a `GlobalDecl` object. https://github.com/llvm/llvm-project/pull/115821 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits