[mlir] Print types to the OpAsmPrinter instead of the raw_ostream.
authorRiver Riddle <riddleriver@gmail.com>
Tue, 4 Feb 2020 20:17:14 +0000 (12:17 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Tue, 4 Feb 2020 20:17:14 +0000 (12:17 -0800)
This allows for reusing the internal state of the printer, which is more
efficient and also allows for using type aliases

mlir/include/mlir/IR/OpImplementation.h

index 7bf4bfe..c3bd683 100644 (file)
@@ -123,7 +123,7 @@ public:
   void printFunctionalType(InputRangeT &&inputs, ResultRangeT &&results) {
     auto &os = getStream();
     os << "(";
-    interleaveComma(inputs, os);
+    interleaveComma(inputs, *this);
     os << ")";
     printArrowTypeList(results);
   }