return IsTypeFunc (Sym->Type) &&
SymIsDef (Sym) &&
(Sym->Flags & (SC_REF | SC_EXTERN));
-}
+}
+void SymSetAsmName (SymEntry* Sym)
+/* Set the assembler name for an external symbol from the name of the symbol */
+{
+ unsigned Len;
+
+ /* Cannot be used to change the name */
+ PRECONDITION (Sym->AsmName == 0);
+
+ /* The assembler name starts with an underline */
+ Len = strlen (Sym->Name);
+ Sym->AsmName = xmalloc (Len + 2);
+ Sym->AsmName[0] = '_';
+ memcpy (Sym->AsmName+1, Sym->Name, Len+1);
+}
+
+
+
void CvtRegVarToAuto (SymEntry* Sym)
/* Convert a register variable to an auto variable */
{