glsl: add a empty set_is_lhs on ast_node

Just to allow to call set_is_lhs on any ast_node without a casting. Useful
when processing a ast_node list that we know it contain ast_expression.

v2: comment out new_value to avoid unused parameter warning (Ian Romanick)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Alejandro Piñeiro 2016-04-19 11:15:54 +02:00
parent 5b2675093e
commit b9f90ef652
2 changed files with 7 additions and 0 deletions

View File

@ -126,6 +126,8 @@ public:
exec_node link;
virtual void set_is_lhs(bool);
protected:
/**
* The only constructor is protected so that only derived class objects can

View File

@ -1053,6 +1053,11 @@ ast_node::has_sequence_subexpression() const
return false;
}
void
ast_node::set_is_lhs(bool /* new_value */)
{
}
void
ast_function_expression::hir_no_rvalue(exec_list *instructions,
struct _mesa_glsl_parse_state *state)