mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 04:46:27 -05:00
shader: Mark blocks with no end branch as unreachable
This commit is contained in:
parent
2ed80f6b1e
commit
dfd5341d71
1 changed files with 7 additions and 2 deletions
|
@ -816,8 +816,13 @@ private:
|
|||
throw NotImplementedException("Statement type {}", stmt.type);
|
||||
}
|
||||
}
|
||||
if (current_block && continue_block) {
|
||||
IR::IREmitter{*current_block}.Branch(continue_block);
|
||||
if (current_block) {
|
||||
IR::IREmitter ir{*current_block};
|
||||
if (continue_block) {
|
||||
ir.Branch(continue_block);
|
||||
} else {
|
||||
ir.Unreachable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue