mirror of
https://github.com/cc65/cc65.git
synced 2025-01-27 09:33:42 +00:00
Don't write out spans for line infos if no debug info is requested for the
object file. git-svn-id: svn://svn.cc65.org/cc65/trunk@5205 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
ec6acb8606
commit
4160505c59
@ -438,6 +438,8 @@ void WriteLineInfos (void)
|
||||
{
|
||||
unsigned I;
|
||||
|
||||
Collection EmptySpans = STATIC_COLLECTION_INITIALIZER;
|
||||
|
||||
/* Tell the object file module that we're about to write line infos */
|
||||
ObjStartLineInfos ();
|
||||
|
||||
@ -456,12 +458,22 @@ void WriteLineInfos (void)
|
||||
/* Write the type and count of the line info */
|
||||
ObjWriteVar (LI_MAKE_TYPE (LI->Key.Type, LI->Key.Count));
|
||||
|
||||
/* Write the spans for this line */
|
||||
/* Spans are only added to the debug file if debug information is
|
||||
* requested. Otherwise we write an empty list.
|
||||
*/
|
||||
if (DbgSyms) {
|
||||
WriteSpans (&LI->Spans);
|
||||
} else {
|
||||
/* Write out an empty list */
|
||||
WriteSpans (&EmptySpans);
|
||||
}
|
||||
}
|
||||
|
||||
/* End of line infos */
|
||||
ObjEndLineInfos ();
|
||||
|
||||
/* For the sake of completeness, but not really necessary */
|
||||
DoneCollection (&EmptySpans);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user