From: Eric Anholt Date: Fri, 26 Mar 2010 22:51:45 +0000 (-0700) Subject: Make read-only variables not be considered lvalues. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c4f86d3b80047ce3a8be1fa69396856af1719bc9;p=mesa.git Make read-only variables not be considered lvalues. This should fix tests trying to assign to builtin "in" variables, and will also be relied on for post_inc/dec handling. --- diff --git a/ir.h b/ir.h index a69f932c5a8..7e2f304b41d 100644 --- a/ir.h +++ b/ir.h @@ -455,7 +455,17 @@ public: bool is_lvalue() { - return var != NULL; + ir_variable *as_var; + + if (var == NULL) + return NULL; + + as_var = var->as_variable(); + + if (as_var == NULL) + return NULL; + + return !as_var->read_only; } enum {