[clang] [clang][OpenMP][SPIR-V] Fix addrspace of pointer kernel arguments (PR #157172)
Nick Sarnie via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 9 07:47:15 PDT 2025
================
@@ -682,23 +687,27 @@ CodeGenFunction::GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S,
SmallString<256> Buffer;
llvm::raw_svector_ostream Out(Buffer);
Out << CapturedStmtInfo->getHelperName();
-
+ OpenMPDirectiveKind EKind = getEffectiveDirectiveKind(D);
+ bool IsDeviceKernel = CGM.getOpenMPRuntime().isGPU() &&
----------------
sarnex wrote:
Yep, `isOpenMPTargetExecutionDirective` is a recursive check so any variant of a target statement should return true here.
```
bool clang::isOpenMPTargetExecutionDirective(OpenMPDirectiveKind DKind) {
return DKind == OMPD_target ||
llvm::is_contained(getLeafConstructs(DKind), OMPD_target);
}
```
Thanks for the review!
https://github.com/llvm/llvm-project/pull/157172
More information about the cfe-commits
mailing list