@@ -2705,23 +2705,18 @@ class SyclKernelIntHeaderCreator : public SyclKernelFieldHandler {
2705
2705
2706
2706
// Sets a flag if the kernel is a parallel_for that calls the
2707
2707
// free function API "this_item".
2708
- void setThisItemIsCalled (const CXXRecordDecl *KernelObj,
2709
- FunctionDecl *KernelFunc) {
2708
+ void setThisItemIsCalled (FunctionDecl *KernelFunc) {
2710
2709
if (getKernelInvocationKind (KernelFunc) != InvokeParallelFor)
2711
2710
return ;
2712
2711
2713
- const CXXMethodDecl *WGLambdaFn = getOperatorParens (KernelObj);
2714
- if (!WGLambdaFn)
2715
- return ;
2716
-
2717
2712
// The call graph for this translation unit.
2718
2713
CallGraph SYCLCG;
2719
2714
SYCLCG.addToCallGraph (SemaRef.getASTContext ().getTranslationUnitDecl ());
2720
2715
using ChildParentPair =
2721
2716
std::pair<const FunctionDecl *, const FunctionDecl *>;
2722
2717
llvm::SmallPtrSet<const FunctionDecl *, 16 > Visited;
2723
2718
llvm::SmallVector<ChildParentPair, 16 > WorkList;
2724
- WorkList.push_back ({WGLambdaFn , nullptr });
2719
+ WorkList.push_back ({KernelFunc , nullptr });
2725
2720
2726
2721
while (!WorkList.empty ()) {
2727
2722
const FunctionDecl *FD = WorkList.back ().first ;
@@ -2759,7 +2754,7 @@ class SyclKernelIntHeaderCreator : public SyclKernelFieldHandler {
2759
2754
bool IsSIMDKernel = isESIMDKernelType (KernelObj);
2760
2755
Header.startKernel (Name, NameType, StableName, KernelObj->getLocation (),
2761
2756
IsSIMDKernel);
2762
- setThisItemIsCalled (KernelObj, KernelFunc);
2757
+ setThisItemIsCalled (KernelFunc);
2763
2758
}
2764
2759
2765
2760
bool handleSyclAccessorType (const CXXRecordDecl *RD,
0 commit comments