[clang] [clang][OpenMP] Place some common code in functions (PR #96811)
Krzysztof Parzyszek via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 26 12:22:15 PDT 2024
================
@@ -3010,6 +3010,28 @@ static bool FinishOpenMPLinearClause(OMPLinearClause &Clause, DeclRefExpr *IV,
Expr *NumIterations, Sema &SemaRef,
Scope *S, DSAStackTy *Stack);
+static bool finishLinearClauses(Sema &SemaRef, ArrayRef<OMPClause *> Clauses,
+ OMPLoopBasedDirective::HelperExprs &B,
+ DSAStackTy *Stack) {
+ assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) &&
+ "loop exprs were not built");
+
+ if (SemaRef.CurContext->isDependentContext())
+ return false;
+
+ // Finalize the clauses that need pre-built expressions for CodeGen.
+ for (OMPClause *C : Clauses) {
+ if (auto *LC = dyn_cast<OMPLinearClause>(C)) {
----------------
kparzysz wrote:
Done.
https://github.com/llvm/llvm-project/pull/96811
More information about the cfe-commits
mailing list