Lines Matching refs:sym
19 static void print_usage(struct position *pos, struct symbol *sym, unsigned mode)
38 static char symscope(struct symbol *sym)
40 if (sym_is_local(sym)) {
42 warning(sym->pos, "no context");
48 static void r_symbol(unsigned mode, struct position *pos, struct symbol *sym)
50 print_usage(pos, sym, mode);
52 if (!sym->ident)
53 sym->ident = built_in_ident("__asm__");
56 symscope(sym), sym->kind, sym->ident->len, sym->ident->name,
57 show_typename(sym->ctype.base_type));
59 switch (sym->kind) {
61 if (sym->type == SYM_STRUCT || sym->type == SYM_UNION)
66 if (sym->type != SYM_BAD && sym->ctype.base_type->type != SYM_FN)
69 if (sym->type == SYM_NODE || sym->type == SYM_BAD)
78 warning(*pos, "r_symbol bad sym type=%d kind=%d", sym->type, sym->kind);
81 static void r_member(unsigned mode, struct position *pos, struct symbol *sym, struct symbol *mem)
85 print_usage(pos, sym, mode);
88 si = sym->ident ?: ni;
93 symscope(sym), si->len, si->name,
95 show_typename(mem ? mem->ctype.base_type : sym));
97 if (sym->ident && sym->kind != 's')
98 warning(*pos, "r_member bad sym type=%d kind=%d", sym->type, sym->kind);
103 static void r_symdef(struct symbol *sym)
105 r_symbol(-1, &sym->pos, sym);
108 static void r_memdef(struct symbol *sym, struct symbol *mem)
110 r_member(-1, &mem->pos, sym, mem);