Commit 7dc5f41b authored by nagayama15's avatar nagayama15

🔧 Fix SEGV when function has no body

parent b407a709
......@@ -68,9 +68,11 @@ namespace kyut::pass {
OperandSwappingExtractingVisitor visitor{writer_};
for (const auto &func : module->functions) {
if (func->body) {
visitor.visit(func->body);
}
}
}
private:
BitWriter &writer_;
......
......@@ -70,9 +70,11 @@ namespace kyut::pass {
OperandSwappingWatermarkingVisitor visitor{stream_};
for (const auto &func : module->functions) {
if (func->body) {
visitor.visit(func->body);
}
}
}
private:
CircularBitStream &stream_;
......
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