================ @@ -7831,10 +7831,14 @@ void CodeGenFunction::EmitOMPTaskLoopBasedDirective(const OMPLoopDirective &S) { // grainsize clause Data.Schedule.setInt(/*IntVal=*/false); Data.Schedule.setPointer(EmitScalarExpr(Clause->getGrainsize())); + Data.HasModifier = + (Clause->getModifier() == OMPC_GRAINSIZE_strict) ? true : false; } else if (const auto *Clause = S.getSingleClause<OMPNumTasksClause>()) { // num_tasks clause Data.Schedule.setInt(/*IntVal=*/true); Data.Schedule.setPointer(EmitScalarExpr(Clause->getNumTasks())); + Data.HasModifier = + (Clause->getModifier() == OMPC_NUMTASKS_strict) ? true : false; ---------------- chandraghale wrote:
@shiltian We need to check which Clause is present (either GrainsizeClause or NumTasksClause) and handle the case where no clause is matched. Combining the conditions would require an extra variable to track the clause type. I suggest sticking with the current logic, as it is simple and clear. What do you think? https://github.com/llvm/llvm-project/pull/117196 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits