[PATCH] D78067: [llvm][STLExtras] Move the algorithm `interleave*` methods from MLIR to LLVM
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 18:05:02 PDT 2020
rriddle marked 2 inline comments as done.
rriddle added inline comments.
================
Comment at: flang/include/flang/Optimizer/Dialect/FIROps.td:251
// print the LEN parameters to a derived type in parens
- p << '(';
- p.printOperands(getLenParams());
- p << " : ";
- mlir::interleaveComma(getLenParams(), p.getStream(),
- [&](const auto &opnd) {
- p.printType(opnd.getType());
- });
- p << ')';
+ p << '(' << getLenParams() << " : " << getLenParams().getTypes() << ')';
}
----------------
lattner wrote:
> How does this work?
All of the value range types(ValueRange, OperandRange, ResultRange, etc.) have utility `getTypes()`/`getType()` methods that return a range of types for the held values. The OpAsmPrinter has `operator<<` overloads for value and type ranges, so there is generally no need to do this manually.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78067/new/
https://reviews.llvm.org/D78067
More information about the llvm-commits
mailing list