Convert imports, exports and debug symbols to use and write line infos instead

of embedded file positions.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4918 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-01-25 16:27:17 +00:00
parent f3487b7c0f
commit 5b79d7e685
3 changed files with 47 additions and 38 deletions

View File

@@ -86,7 +86,8 @@ SymEntry* NewSymEntry (const StrBuf* Name, unsigned Flags)
S->Right = 0;
S->Locals = 0;
S->Sym.Tab = 0;
S->Pos = CurTok.Pos;
S->LineInfos = EmptyCollection;
GetFullLineInfo (&S->LineInfos);
for (I = 0; I < sizeof (S->GuessedUse) / sizeof (S->GuessedUse[0]); ++I) {
S->GuessedUse[I] = 0;
}
@@ -693,3 +694,12 @@ unsigned GetSymInfoFlags (const SymEntry* S, long* ConstVal)
const FilePos* GetSymPos (const SymEntry* S)
/* Return the position of first occurence in the source for the given symbol */
{
/* The actual source entry is in slot zero */
return &((const LineInfo*) CollConstAt (&S->LineInfos, 0))->Pos;
}