ir_constant_expression: Remove pointless use of variable_referenced.
ir_dereference_variable always references an ir_variable, so there's no point in calling a function and NULL-checking the result.
This commit is contained in:

committed by
Ian Romanick

parent
98f32a13be
commit
e4768eecd5
@@ -695,10 +695,7 @@ ir_swizzle::constant_expression_value()
|
|||||||
ir_constant *
|
ir_constant *
|
||||||
ir_dereference_variable::constant_expression_value()
|
ir_dereference_variable::constant_expression_value()
|
||||||
{
|
{
|
||||||
ir_variable *var = this->variable_referenced();
|
return var->constant_value ? var->constant_value->clone(NULL) : NULL;
|
||||||
if (var && var->constant_value)
|
|
||||||
return var->constant_value->clone(NULL);
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user