ir_dead_code: Fix segfault on handling a return statement with no value.
This commit is contained in:
parent
a2c6df5566
commit
438f38c55a
1 changed files with 4 additions and 1 deletions
|
|
@ -251,7 +251,10 @@ ir_dead_code_visitor::visit(ir_call *ir)
|
|||
void
|
||||
ir_dead_code_visitor::visit(ir_return *ir)
|
||||
{
|
||||
ir->get_value()->accept(this);
|
||||
ir_rvalue *val = ir->get_value();
|
||||
|
||||
if (val)
|
||||
val->accept(this);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue