[llvm-branch-commits] [flang] [flang][OpenMP] Convert repeatable clauses (except Map) in ClauseProc… (PR #81623)
Tom Eccles via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 12 11:34:24 PDT 2024
================
@@ -181,45 +172,41 @@ genDependKindAttr(fir::FirOpBuilder &firOpBuilder,
pbKind);
}
-static mlir::Value getIfClauseOperand(
- Fortran::lower::AbstractConverter &converter,
- const Fortran::parser::OmpClause::If *ifClause,
- Fortran::parser::OmpIfClause::DirectiveNameModifier directiveName,
- mlir::Location clauseLocation) {
+static mlir::Value
+getIfClauseOperand(Fortran::lower::AbstractConverter &converter,
+ const omp::clause::If &clause,
+ omp::clause::If::DirectiveNameModifier directiveName,
+ mlir::Location clauseLocation) {
// Only consider the clause if it's intended for the given directive.
- auto &directive = std::get<
- std::optional<Fortran::parser::OmpIfClause::DirectiveNameModifier>>(
- ifClause->v.t);
+ auto &directive =
+ std::get<std::optional<omp::clause::If::DirectiveNameModifier>>(clause.t);
if (directive && directive.value() != directiveName)
return nullptr;
Fortran::lower::StatementContext stmtCtx;
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
- auto &expr = std::get<Fortran::parser::ScalarLogicalExpr>(ifClause->v.t);
mlir::Value ifVal = fir::getBase(
- converter.genExprValue(*Fortran::semantics::GetExpr(expr), stmtCtx));
+ converter.genExprValue(std::get<omp::SomeExpr>(clause.t), stmtCtx));
----------------
tblah wrote:
Here too
https://github.com/llvm/llvm-project/pull/81623
More information about the llvm-branch-commits
mailing list