[llvm-branch-commits] [flang] [flang][OpenMP] Convert repeatable clauses (except Map) in ClauseProc… (PR #81623)

Sergio Afonso via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Mar 12 07:50:08 PDT 2024


================
@@ -28,9 +29,27 @@ namespace Fortran {
 namespace lower {
 namespace omp {
 
-void genObjectList(const Fortran::parser::OmpObjectList &objectList,
+void genObjectList(const ObjectList &objects,
                    Fortran::lower::AbstractConverter &converter,
                    llvm::SmallVectorImpl<mlir::Value> &operands) {
+  for (const Object &object : objects) {
+    const Fortran::semantics::Symbol *sym = object.id();
+    assert(sym && "Expected Symbol");
+    if (mlir::Value variable = converter.getSymbolAddress(*sym)) {
+      operands.push_back(variable);
+    } else {
----------------
skatrak wrote:

Nit: I know this follows the previous implementation, but I think it'd be better to collapse this into an `else if` and get rid of one nesting level. Feel free to ignore if you disagree.

https://github.com/llvm/llvm-project/pull/81623


More information about the llvm-branch-commits mailing list