Commit 7dc5f41b authored by nagayama15's avatar nagayama15

🔧 Fix SEGV when function has no body

parent b407a709
......@@ -68,7 +68,9 @@ namespace kyut::pass {
OperandSwappingExtractingVisitor visitor{writer_};
for (const auto &func : module->functions) {
visitor.visit(func->body);
if (func->body) {
visitor.visit(func->body);
}
}
}
......
......@@ -70,7 +70,9 @@ namespace kyut::pass {
OperandSwappingWatermarkingVisitor visitor{stream_};
for (const auto &func : module->functions) {
visitor.visit(func->body);
if (func->body) {
visitor.visit(func->body);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment