From: Alejandro PiƱeiro Date: Tue, 19 Apr 2016 09:15:54 +0000 (+0200) Subject: glsl: add a empty set_is_lhs on ast_node X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9f90ef652dae687a5aff97f9132b374320638a5;p=mesa.git 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 --- diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h index fb25bb357a3..ca98ed2834d 100644 --- a/src/compiler/glsl/ast.h +++ b/src/compiler/glsl/ast.h @@ -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 diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 22bc0083326..e1e26f8f6ac 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -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)