[clang] [OpenMP] Clang Codegen Interop : Accept multiple init (PR #82604)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 28 06:13:50 PST 2024
================
@@ -7023,19 +7023,25 @@ void CodeGenFunction::EmitOMPInteropDirective(const OMPInteropDirective &S) {
S.getSingleClause<OMPUseClause>())) &&
"OMPNowaitClause clause is used separately in OMPInteropDirective.");
- if (const auto *C = S.getSingleClause<OMPInitClause>()) {
- llvm::Value *InteropvarPtr =
- EmitLValue(C->getInteropVar()).getPointer(*this);
- llvm::omp::OMPInteropType InteropType = llvm::omp::OMPInteropType::Unknown;
- if (C->getIsTarget()) {
- InteropType = llvm::omp::OMPInteropType::Target;
- } else {
- assert(C->getIsTargetSync() && "Expected interop-type target/targetsync");
- InteropType = llvm::omp::OMPInteropType::TargetSync;
+ auto It = S.getClausesOfKind<OMPInitClause>();
+ if (!It.empty()) {
+ // Look at the multiple init clauses
+ for (const class OMPInitClause *C : It) {
----------------
alexey-bataev wrote:
Drop 'class', it won't compile
https://github.com/llvm/llvm-project/pull/82604
More information about the cfe-commits
mailing list