Maintain the types as separate indexed items in the debug info file.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5263 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-08-22 18:22:45 +00:00
parent b064002266
commit 374b106b06
7 changed files with 89 additions and 25 deletions

View File

@@ -38,6 +38,8 @@
#include <stdio.h>
/* common */
#include "strpool.h"
@@ -49,8 +51,8 @@
/* An empty type */
#define EMPTY_TYPE_ID 0U
/* An invalid type */
#define INVALID_TYPE_ID (~0U)
/* The string pool we're using */
extern StringPool* TypePool;
@@ -83,6 +85,19 @@ INLINE const StrBuf* GetType (unsigned Index)
# define GetType(Index) SP_Get (TypePool, (Index))
#endif
#if defined(HAVE_INLINE)
INLINE unsigned TypeCount (void)
/* Return the number of types in the pool */
{
return SP_GetCount (TypePool);
}
#else
# define TypeCount() SP_GetCount (TypePool)
#endif
void PrintDbgTypes (FILE* F);
/* Output the types to a debug info file */
void InitTypePool (void);
/* Initialize the type pool */