Move AssignIds to before we print the info line in order to ensure that we write the correct file count.

This commit is contained in:
Willis Blackburn
2026-02-12 17:54:58 -05:00
parent 0fca83500b
commit 5f437e09a0

View File

@@ -113,6 +113,9 @@ void CreateDbgFile (void)
/* Output version information */ /* Output version information */
fprintf (F, "version\tmajor=2,minor=0\n"); fprintf (F, "version\tmajor=2,minor=0\n");
/* Assign the ids to the items: this must occur before info, as it removes unused items */
AssignIds ();
/* Output a line with the item numbers so the debug info module is able /* Output a line with the item numbers so the debug info module is able
** to preallocate the required memory. ** to preallocate the required memory.
*/ */
@@ -131,9 +134,6 @@ void CreateDbgFile (void)
TypeCount () TypeCount ()
); );
/* Assign the ids to the items */
AssignIds ();
/* Output high level language symbols */ /* Output high level language symbols */
PrintHLLDbgSyms (F); PrintHLLDbgSyms (F);