File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ void BasicIrPrinter::PrintType(Type type) {
7878 }
7979}
8080
81- void BasicIrPrinter::PrintAttribute (const Attribute& attr) {
81+ void BasicIrPrinter::PrintAttribute (Attribute attr) {
8282 if (!attr) {
8383 os << " <#AttrNull>" ;
8484 return ;
@@ -119,15 +119,7 @@ void IrPrinter::PrintProgram(Program* program) {
119119 auto top_level_op = program->module_op ();
120120 for (size_t i = 0 ; i < top_level_op->num_regions (); ++i) {
121121 auto & region = top_level_op->region (i);
122- for (auto it = region.begin (); it != region.end (); ++it) {
123- auto * block = *it;
124- os << " {\n " ;
125- for (auto it = block->begin (); it != block->end (); ++it) {
126- PrintOperation (*it);
127- os << newline;
128- }
129- os << " }\n " ;
130- }
122+ PrintRegion (region);
131123 }
132124}
133125
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class BasicIrPrinter {
3434
3535 void PrintType (Type type);
3636
37- void PrintAttribute (const Attribute& attr);
37+ void PrintAttribute (Attribute attr);
3838
3939 public:
4040 std::ostream& os;
You can’t perform that action at this time.
0 commit comments