[qfcc] Mark spirv variable declarations as lvalues

I'm not sure this is always correct, but it does respect `const`.
This commit is contained in:
Bill Currie 2024-11-13 12:16:43 +09:00
parent b43fe9ddc5
commit 410317fdf7

View file

@ -1193,6 +1193,7 @@ spirv_declare_sym (specifier_t spec, const expr_t *init, symtab_t *symtab,
// spir-v locals are references
sym->type = reference_type (sym->type);
}
sym->lvalue = !spec.is_const;
symtab_addsymbol (symtab, sym);
if (symtab->type == stab_local) {
if (init) {