File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ void BasicIrPrinter::PrintType(Type type) {
78
78
}
79
79
}
80
80
81
- void BasicIrPrinter::PrintAttribute (const Attribute& attr) {
81
+ void BasicIrPrinter::PrintAttribute (Attribute attr) {
82
82
if (!attr) {
83
83
os << " <#AttrNull>" ;
84
84
return ;
@@ -119,15 +119,7 @@ void IrPrinter::PrintProgram(Program* program) {
119
119
auto top_level_op = program->module_op ();
120
120
for (size_t i = 0 ; i < top_level_op->num_regions (); ++i) {
121
121
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);
131
123
}
132
124
}
133
125
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class BasicIrPrinter {
34
34
35
35
void PrintType (Type type);
36
36
37
- void PrintAttribute (const Attribute& attr);
37
+ void PrintAttribute (Attribute attr);
38
38
39
39
public:
40
40
std::ostream& os;
You can’t perform that action at this time.
0 commit comments