glsl: add a empty set_is_lhs on ast_node
authorAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 19 Apr 2016 09:15:54 +0000 (11:15 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 26 May 2016 06:39:07 +0000 (08:39 +0200)
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>
src/compiler/glsl/ast.h
src/compiler/glsl/ast_to_hir.cpp

index fb25bb357a3df2de0a54e2406e4c3343bb5dfdd3..ca98ed2834d0ad956015ce36e221a70c434912d5 100644 (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
index 22bc008332687377582509b6e65122c1c47a6d86..e1e26f8f6ac45e7e1d8a75ecd7f5c139928baf20 100644 (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)