mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix lb_build_defer_stmt
This commit is contained in:
@@ -8556,6 +8556,9 @@ lbValue lb_emit_deep_field_ev(lbProcedure *p, lbValue e, Selection sel) {
|
|||||||
|
|
||||||
|
|
||||||
void lb_build_defer_stmt(lbProcedure *p, lbDefer const &d) {
|
void lb_build_defer_stmt(lbProcedure *p, lbDefer const &d) {
|
||||||
|
if (p->curr_block == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// NOTE(bill): The prev block may defer injection before it's terminator
|
// NOTE(bill): The prev block may defer injection before it's terminator
|
||||||
LLVMValueRef last_instr = LLVMGetLastInstruction(p->curr_block->block);
|
LLVMValueRef last_instr = LLVMGetLastInstruction(p->curr_block->block);
|
||||||
if (last_instr != nullptr && LLVMIsAReturnInst(last_instr)) {
|
if (last_instr != nullptr && LLVMIsAReturnInst(last_instr)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user