git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2507
4a8a32a2-be11-0410-ad9d-
d568d2c75423
void
printAllocInfo (symbol * func, FILE * of)
{
+ if (!func)
+ return;
+
if (!of)
of = stdout;
-
+
/* must be called after register allocation is complete */
fprintf (of, ";------------------------------------------------------------\n");
fprintf (of, ";Allocation info for local variables in function '%s'\n", func->name);
}
#if 1
/* print the allocation information */
- if (allocInfo)
+ if (allocInfo && currFunc)
printAllocInfo (currFunc, codeOutFile);
#endif
/* if debug information required */
lineHead = lineCurr = NULL;
/* print the allocation information */
- if (allocInfo)
+ if (allocInfo && currFunc)
printAllocInfo (currFunc, codeOutFile);
/* if debug information required */
if (options.debug && currFunc)