| 2488 | return _last_block; |
| 2489 | } |
| 2490 | void enter_block(id id) override |
| 2491 | { |
| 2492 | assert(id != 0); |
| 2493 | // Can only use labels inside functions and should never be in another basic block if creating a new one |
| 2494 | assert(is_in_function() && !is_in_block()); |
| 2495 | |
| 2496 | set_block(id); |
| 2497 | |
| 2498 | add_instruction_without_result(spv::OpLabel).result = id; |
| 2499 | } |
| 2500 | id leave_block_and_kill() override |
| 2501 | { |
| 2502 | assert(is_in_function()); // Can only discard inside functions |
no test coverage detected