extvar: skip decl registration
[m6w6/ext-psi] / src / types / decl.c
index 300f5bdd36b6e1a782285e54423dbfbb3e2064bf..40d8c251f0e484123277dfda6b97f4c517fbb97c 100644 (file)
@@ -66,7 +66,9 @@ void psi_decl_free(struct psi_decl **d_ptr)
 
 void psi_decl_dump(int fd, struct psi_decl *decl)
 {
-       psi_decl_abi_dump(fd, decl->abi);
+       if (decl->abi) {
+               psi_decl_abi_dump(fd, decl->abi);
+       }
        dprintf(fd, " ");
        /* FIXME: functions returning arrays */
        psi_decl_arg_dump(fd, decl->func, 0);
@@ -85,6 +87,9 @@ void psi_decl_dump(int fd, struct psi_decl *decl)
                        dprintf(fd, ", ...");
                }
        }
+       if (decl->func->var->array_size) {
+               dprintf(fd, ")[%zu]", decl->func->var->array_size);
+       }
        if (decl->redir) {
                dprintf(fd, ") __asm__ (\"%s\");", decl->redir);
        } else {