Commit 49bcfa57 authored by nagayama15's avatar nagayama15

Fix order to visit expression node

parent 7ecdae7b
......@@ -34,6 +34,8 @@ namespace wasm {
}
[[nodiscard]] inline bool operator<(const Expression &a, const Expression &b) {
static_assert(Expression::NumExpressionIds == 36);
constexpr auto opt = [](const Expression *p) -> boost::optional<const Expression &> {
if (p == nullptr) {
return boost::none;
......
......@@ -156,9 +156,9 @@ namespace kyut::watermarker {
SideEffect visitSelect(wasm::Select *expr) {
return (std::max)({
visit(expr->condition),
visit(expr->ifTrue),
visit(expr->ifFalse),
visit(expr->condition),
});
}
......
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