File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -194,16 +194,17 @@ class PrintOpPass : public impl::ViewOpGraphBase<PrintOpPass> {
194194
195195 // Always emit splat attributes.
196196 if (isa<SplatElementsAttr>(attr)) {
197- attr.print (os);
197+ os << escapeLabelString (
198+ strFromOs ([&](raw_ostream &os) { attr.print (os); }));
198199 return ;
199200 }
200201
201202 // Elide "big" elements attributes.
202203 auto elements = dyn_cast<ElementsAttr>(attr);
203204 if (elements && elements.getNumElements () > largeAttrLimit) {
204205 os << std::string (elements.getShapedType ().getRank (), ' [' ) << " ..."
205- << std::string (elements.getShapedType ().getRank (), ' ]' ) << " : "
206- << elements.getType ();
206+ << std::string (elements.getShapedType ().getRank (), ' ]' ) << " : " ;
207+ emitMlirType (os, elements.getType () );
207208 return ;
208209 }
209210
@@ -313,7 +314,7 @@ class PrintOpPass : public impl::ViewOpGraphBase<PrintOpPass> {
313314 if (printAttrs) {
314315 os << " \\ l" ;
315316 for (const NamedAttribute &attr : op->getAttrs ()) {
316- os << attr.getName ().getValue () << " : " ;
317+ os << escapeLabelString ( attr.getName ().getValue (). str () ) << " : " ;
317318 emitMlirAttr (os, attr.getValue ());
318319 os << " \\ l" ;
319320 }
You can’t perform that action at this time.
0 commit comments