X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Fsymentry.c;h=e42c8bbaa52a45be4bcd537515a2f0deb1212045;hb=77bfcc1ff0a88e0430f077d22b6fad07c7d0c86b;hp=aedf2652e0899fe744d387f30c24bdee05bb2053;hpb=548336a7bdbf244c3ac6ce5f45e9092486a372dc;p=cc65 diff --git a/src/cc65/symentry.c b/src/cc65/symentry.c index aedf2652e..e42c8bbaa 100644 --- a/src/cc65/symentry.c +++ b/src/cc65/symentry.c @@ -153,6 +153,19 @@ void DumpSymEntry (FILE* F, const SymEntry* E) +int SymIsOutputFunc (const SymEntry* Sym) +/* Return true if this is a function that must be output */ +{ + /* Symbol must be a function which is defined and either extern or + * static and referenced. + */ + return IsTypeFunc (Sym->Type) && + SymIsDef (Sym) && + (Sym->Flags & (SC_REF | SC_EXTERN)); +} + + + const DeclAttr* SymGetAttr (const SymEntry* Sym, DeclAttrType AttrType) /* Return an attribute for this symbol or NULL if the attribute does not exist */ {