]> git.sur5r.net Git - cc65/blobdiff - src/cc65/symentry.c
Fixed two compiler warnings.
[cc65] / src / cc65 / symentry.c
index 6ad4a5cfcb051a389ee831f4ef4d008986fa080e..e42c8bbaa52a45be4bcd537515a2f0deb1212045 100644 (file)
@@ -153,7 +153,20 @@ void DumpSymEntry (FILE* F, const SymEntry* E)
 
 
 
-const DeclAttr* SymGetAttribute (const SymEntry* Sym, DeclAttrType AttrType)
+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 */
 {
     /* Beware: We may not even have a collection */
@@ -177,7 +190,7 @@ const DeclAttr* SymGetAttribute (const SymEntry* Sym, DeclAttrType AttrType)
 
 
 
-void SymUseAttributes (SymEntry* Sym, struct Declaration* D)
+void SymUseAttr (SymEntry* Sym, struct Declaration* D)
 /* Use the attributes from the declaration for this symbol */
 {
     /* We cannot specify attributes twice */