mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[qfcc] Don't check for redefs of unnamed symbols
Both glsl and spir-v need this for non-instanced interface blocks.
This commit is contained in:
parent
128682624e
commit
59c8e8e907
1 changed files with 8 additions and 4 deletions
|
@ -1761,16 +1761,20 @@ spirv_declare_sym (specifier_t spec, const expr_t *init, symtab_t *symtab,
|
|||
expr_t *block)
|
||||
{
|
||||
symbol_t *sym = spec.sym;
|
||||
symbol_t *check = symtab_lookup (symtab, sym->name);
|
||||
if (check && check->table == symtab) {
|
||||
error (0, "%s redefined", sym->name);
|
||||
if (sym->name[0]) {
|
||||
symbol_t *check = symtab_lookup (symtab, sym->name);
|
||||
if (check && check->table == symtab) {
|
||||
error (0, "%s redefined", sym->name);
|
||||
}
|
||||
}
|
||||
auto storage = spirv_storage_class (spec.storage);
|
||||
sym->type = tagged_reference_type (storage, sym->type);
|
||||
sym->lvalue = !spec.is_const;
|
||||
sym->sy_type = sy_var;
|
||||
sym->var.storage = spec.storage;
|
||||
symtab_addsymbol (symtab, sym);
|
||||
if (sym->name[0]) {
|
||||
symtab_addsymbol (symtab, sym);
|
||||
}
|
||||
if (symtab->type == stab_local) {
|
||||
if (init) {
|
||||
if (!block && is_constexpr (init)) {
|
||||
|
|
Loading…
Reference in a new issue