mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 06:19:19 +02:00
* initialize module id of a symtable always to the id of the current module (at least if there is a current module, which is not the case for the initial macro symtable)
git-svn-id: trunk@35334 -
This commit is contained in:
parent
f0a8355b84
commit
969e19ba1a
@ -51,6 +51,7 @@ interface
|
|||||||
procedure writedefs(ppufile:tcompilerppufile);
|
procedure writedefs(ppufile:tcompilerppufile);
|
||||||
procedure writesyms(ppufile:tcompilerppufile);
|
procedure writesyms(ppufile:tcompilerppufile);
|
||||||
public
|
public
|
||||||
|
constructor create(const s:string);
|
||||||
procedure insert(sym:TSymEntry;checkdup:boolean=true);override;
|
procedure insert(sym:TSymEntry;checkdup:boolean=true);override;
|
||||||
procedure delete(sym:TSymEntry);override;
|
procedure delete(sym:TSymEntry);override;
|
||||||
{ load/write }
|
{ load/write }
|
||||||
@ -450,6 +451,18 @@ implementation
|
|||||||
TStoredSymtable
|
TStoredSymtable
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
|
|
||||||
|
constructor tstoredsymtable.create(const s:string);
|
||||||
|
begin
|
||||||
|
inherited create(s);
|
||||||
|
{ Note: this happens for the initial macro symtable, so no error here }
|
||||||
|
if not assigned(current_module) then
|
||||||
|
comment(v_debug,'Current module not available for module id')
|
||||||
|
else
|
||||||
|
moduleid:=current_module.moduleid;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tstoredsymtable.insert(sym:TSymEntry;checkdup:boolean=true);
|
procedure tstoredsymtable.insert(sym:TSymEntry;checkdup:boolean=true);
|
||||||
begin
|
begin
|
||||||
inherited insert(sym,checkdup);
|
inherited insert(sym,checkdup);
|
||||||
@ -1060,7 +1073,6 @@ implementation
|
|||||||
constructor tabstractrecordsymtable.create(const n:string;usealign,recordminalign,recordmaxCalign:shortint);
|
constructor tabstractrecordsymtable.create(const n:string;usealign,recordminalign,recordmaxCalign:shortint);
|
||||||
begin
|
begin
|
||||||
inherited create(n);
|
inherited create(n);
|
||||||
moduleid:=current_module.moduleid;
|
|
||||||
_datasize:=0;
|
_datasize:=0;
|
||||||
databitsize:=0;
|
databitsize:=0;
|
||||||
recordalignment:=1;
|
recordalignment:=1;
|
||||||
|
Loading…
Reference in New Issue
Block a user