[flang-commits] [flang] 64be3fc - Fix flang build after D97804

River Riddle via flang-commits flang-commits at lists.llvm.org
Wed Mar 3 15:07:16 PST 2021


Author: River Riddle
Date: 2021-03-03T15:07:03-08:00
New Revision: 64be3fcb7a2ece5aa28296b1e53b5ae448bd1713

URL: https://github.com/llvm/llvm-project/commit/64be3fcb7a2ece5aa28296b1e53b5ae448bd1713
DIFF: https://github.com/llvm/llvm-project/commit/64be3fcb7a2ece5aa28296b1e53b5ae448bd1713.diff

LOG: Fix flang build after D97804

Added: 
    

Modified: 
    flang/lib/Optimizer/Dialect/FIROps.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Optimizer/Dialect/FIROps.cpp b/flang/lib/Optimizer/Dialect/FIROps.cpp
index 2f09de6b6a86..cb8ec75d2cf2 100644
--- a/flang/lib/Optimizer/Dialect/FIROps.cpp
+++ b/flang/lib/Optimizer/Dialect/FIROps.cpp
@@ -957,9 +957,10 @@ static void print(mlir::OpAsmPrinter &p, fir::IterWhileOp op) {
     llvm::interleaveComma(
         llvm::zip(regionArgs.drop_front(), operands.drop_front()), p,
         [&](auto it) { p << std::get<0>(it) << " = " << std::get<1>(it); });
-    auto resTypes = op.finalValue() ? op.getResultTypes()
-                                    : op.getResultTypes().drop_front();
-    p << ") -> (" << resTypes << ')';
+    p << ") -> (";
+    llvm::interleaveComma(
+        llvm::drop_begin(op.getResultTypes(), op.finalValue() ? 0 : 1), p);
+    p << ")";
   } else if (op.finalValue()) {
     p << " -> (" << op.getResultTypes() << ')';
   }


        


More information about the flang-commits mailing list