X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Fsymentry.h;h=d83113809533ef587ec041db5355badda1f045fa;hb=9b7c16ec4cbb5282642c377272224e3fc825f860;hp=06e5a0e871b3f305c9e94a78d0c73285ac5bd8d8;hpb=5a00b38aab6542dfa74c1be66839c57c24e81d77;p=cc65 diff --git a/src/cc65/symentry.h b/src/cc65/symentry.h index 06e5a0e87..d83113809 100644 --- a/src/cc65/symentry.h +++ b/src/cc65/symentry.h @@ -231,10 +231,20 @@ INLINE const char* SymGetAsmName (const SymEntry* Sym) # define SymGetAsmName(Sym) ((Sym)->AsmName) #endif -const DeclAttr* SymGetAttribute (const SymEntry* Sym, DeclAttrType AttrType); +const DeclAttr* SymGetAttr (const SymEntry* Sym, DeclAttrType AttrType); /* Return an attribute for this symbol or NULL if the attribute does not exist */ -void SymUseAttributes (SymEntry* Sym, struct Declaration* D); +#if defined(HAVE_INLINE) +INLINE int SymHasAttr (const SymEntry* Sym, DeclAttrType A) +/* Return true if the symbol has the given attribute */ +{ + return (SymGetAttr (Sym, A) != 0); +} +#else +# define SymHasAttr(Sym, A) (SymGetAttr (Sym, A) != 0) +#endif + +void SymUseAttr (SymEntry* Sym, struct Declaration* D); /* Use the attributes from the declaration for this symbol */ void CvtRegVarToAuto (SymEntry* Sym);