mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
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.
This commit is contained in:
parent
3c36b2df7c
commit
c4f86d3b80
1 changed files with 11 additions and 1 deletions
12
ir.h
12
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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue