forked from KPGPMC/furlang
refactor(IR): add branch instruction on block exit in if statement
This commit is contained in:
@@ -56,6 +56,7 @@ void ir_generator::visit(const ast::if_statement_node& node) {
|
|||||||
push_block(); // else block
|
push_block(); // else block
|
||||||
node.elze()->accept(*this);
|
node.elze()->accept(*this);
|
||||||
}
|
}
|
||||||
|
m_currentBlock->emplace<ir::branch_instruction>(m_currentFunction->blocks().size());
|
||||||
|
|
||||||
push_block(); // merge block
|
push_block(); // merge block
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user