[llvm-branch-commits] [flang] [flang][OpenMP] Identify affected loops, provide reason (PR #185299)
Michael Kruse via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 12 05:58:52 PDT 2026
================
@@ -528,6 +528,42 @@ MaybeExpr MakeEvaluateExpr(const parser::OmpStylizedInstance &inp) {
instance.u);
}
+std::pair<std::optional<int64_t>, Reason> GetArgumentValueWithReason(
+ const parser::OmpDirectiveSpecification &spec, llvm::omp::Clause clauseId,
+ unsigned version) {
+ if (auto *clause{parser::omp::FindClause(spec, clauseId)}) {
+ if (auto *expr{parser::Unwrap<parser::Expr>(clause->u)}) {
+ if (auto value{GetIntValue(*expr)}) {
+ llvm::StringRef name{llvm::omp::getOpenMPClauseName(clauseId, version)};
+ Reason reason( //
----------------
Meinersbur wrote:
```suggestion
Reason reason(
```
[nit] Is this to force clang-format a certain way?
https://github.com/llvm/llvm-project/pull/185299
More information about the llvm-branch-commits
mailing list