[llvm-branch-commits] [flang] [mlir] [Flang][mlir][OpenMP] Support affinity clause codegen in Flang (PR #182222)
Tom Eccles via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Feb 23 03:52:03 PST 2026
================
@@ -202,6 +202,92 @@ getIfClauseOperand(lower::AbstractConverter &converter,
ifVal);
}
+template <typename IteratorSpecT>
+static IteratorRange lowerIteratorRange(
+ Fortran::lower::AbstractConverter &converter, const IteratorSpecT &itSpec,
+ Fortran::lower::StatementContext &stmtCtx, mlir::Location loc) {
+ auto &builder = converter.getFirOpBuilder();
+
+ const auto &ivObj = std::get<1>(itSpec.t);
+ const auto &range = std::get<2>(itSpec.t);
----------------
tblah wrote:
The style we usually use is to avoid `auto` in places where the type is not obvious from the context. Some examples that do fit the style:
```
const auto &ivObj = std::get<SomeType>(itSpec.t); // this is fine, the type is obvious from the expression
const SomeType &ivObj = std::get<1>(itSpec.t); // also fine: type is given explicitly
auto itOp = mlir::omp::IteratorsOp::create(...); // ::create methods are well understood: type obvious from the initialiser expression.
```
https://github.com/llvm/llvm-project/pull/182222
More information about the llvm-branch-commits
mailing list