mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-07 08:19:26 +01:00
dbgllvm: rename hastable for staticvarsym declarations
This commit is contained in:
parent
a76038e1d1
commit
e7ec91eca8
@ -75,8 +75,8 @@ interface
|
|||||||
flocationmeta: THashSet;
|
flocationmeta: THashSet;
|
||||||
{ lookup table for scope,file -> LLVMMeta info (DILexicalBlockFile, for include files) }
|
{ lookup table for scope,file -> LLVMMeta info (DILexicalBlockFile, for include files) }
|
||||||
flexicalblockfilemeta: THashSet;
|
flexicalblockfilemeta: THashSet;
|
||||||
{ lookup table for tsym -> taillvmdecl }
|
{ lookup table for tstaticvarsym -> taillvmdecl }
|
||||||
fsymdecl: THashSet;
|
fstaticvarsymdecl: THashSet;
|
||||||
|
|
||||||
fcunode: tai_llvmspecialisedmetadatanode;
|
fcunode: tai_llvmspecialisedmetadatanode;
|
||||||
fenums: tai_llvmunnamedmetadatanode;
|
fenums: tai_llvmunnamedmetadatanode;
|
||||||
@ -101,8 +101,8 @@ interface
|
|||||||
function filepos_getmetanode(const filepos: tfileposinfo; const functionfileinfo: tfileposinfo; const functionscope: tai_llvmspecialisedmetadatanode; nolineinfo: boolean): tai_llvmspecialisedmetadatanode;
|
function filepos_getmetanode(const filepos: tfileposinfo; const functionfileinfo: tfileposinfo; const functionscope: tai_llvmspecialisedmetadatanode; nolineinfo: boolean): tai_llvmspecialisedmetadatanode;
|
||||||
function get_def_metatai(def:tdef): PLLVMMetaDefHashSetItem;
|
function get_def_metatai(def:tdef): PLLVMMetaDefHashSetItem;
|
||||||
|
|
||||||
procedure sym_set_decl(sym: tsym; decl: tai);
|
procedure staticvarsym_set_decl(sym: tsym; decl: taillvmdecl);
|
||||||
function sym_get_decl(sym: tsym): taillvmdecl;
|
function staticvarsym_get_decl(sym: tsym): taillvmdecl;
|
||||||
|
|
||||||
procedure appenddef_array_internal(list: TAsmList; fordef: tdef; eledef: tdef; lowrange, highrange: asizeint);
|
procedure appenddef_array_internal(list: TAsmList; fordef: tdef; eledef: tdef; lowrange, highrange: asizeint);
|
||||||
function getabstractprocdeftypes(list: TAsmList; def:tabstractprocdef): tai_llvmbasemetadatanode;
|
function getabstractprocdeftypes(list: TAsmList; def:tabstractprocdef): tai_llvmbasemetadatanode;
|
||||||
@ -310,22 +310,22 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDebugInfoLLVM.sym_set_decl(sym: tsym; decl: tai);
|
procedure TDebugInfoLLVM.staticvarsym_set_decl(sym: tsym; decl: taillvmdecl);
|
||||||
var
|
var
|
||||||
entry: PHashSetItem;
|
entry: PHashSetItem;
|
||||||
begin
|
begin
|
||||||
entry:=fsymdecl.FindOrAdd(@sym,sizeof(sym));
|
entry:=fstaticvarsymdecl.FindOrAdd(@sym,sizeof(sym));
|
||||||
if assigned(entry^.Data) then
|
if assigned(entry^.Data) then
|
||||||
internalerror(2022051701);
|
internalerror(2022051701);
|
||||||
entry^.Data:=decl;
|
entry^.Data:=decl;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDebugInfoLLVM.sym_get_decl(sym: tsym): taillvmdecl;
|
function TDebugInfoLLVM.staticvarsym_get_decl(sym: tsym): taillvmdecl;
|
||||||
var
|
var
|
||||||
entry: PHashSetItem;
|
entry: PHashSetItem;
|
||||||
begin
|
begin
|
||||||
result:=nil;
|
result:=nil;
|
||||||
entry:=fsymdecl.Find(@sym,sizeof(sym));
|
entry:=fstaticvarsymdecl.Find(@sym,sizeof(sym));
|
||||||
if assigned(entry) then
|
if assigned(entry) then
|
||||||
result:=taillvmdecl(entry^.Data);
|
result:=taillvmdecl(entry^.Data);
|
||||||
end;
|
end;
|
||||||
@ -423,7 +423,7 @@ implementation
|
|||||||
flocationmeta:=thashset.Create(10000,true,false);
|
flocationmeta:=thashset.Create(10000,true,false);
|
||||||
flexicalblockfilemeta:=thashset.Create(100,true,false);
|
flexicalblockfilemeta:=thashset.Create(100,true,false);
|
||||||
fdefmeta:=TLLVMMetaDefHashSet.Create(10000,true,false);
|
fdefmeta:=TLLVMMetaDefHashSet.Create(10000,true,false);
|
||||||
fsymdecl:=thashset.create(10000,true,false);
|
fstaticvarsymdecl:=thashset.create(10000,true,false);
|
||||||
|
|
||||||
defnumberlist:=TFPObjectList.create(false);
|
defnumberlist:=TFPObjectList.create(false);
|
||||||
deftowritelist:=TFPObjectList.create(false);
|
deftowritelist:=TFPObjectList.create(false);
|
||||||
@ -443,8 +443,8 @@ implementation
|
|||||||
flexicalblockfilemeta:=nil;
|
flexicalblockfilemeta:=nil;
|
||||||
fdefmeta.free;
|
fdefmeta.free;
|
||||||
fdefmeta:=nil;
|
fdefmeta:=nil;
|
||||||
fsymdecl.free;
|
fstaticvarsymdecl.free;
|
||||||
fsymdecl:=nil;
|
fstaticvarsymdecl:=nil;
|
||||||
defnumberlist.free;
|
defnumberlist.free;
|
||||||
defnumberlist:=nil;
|
defnumberlist:=nil;
|
||||||
deftowritelist.free;
|
deftowritelist.free;
|
||||||
@ -500,7 +500,7 @@ implementation
|
|||||||
flocationmeta.Clear;
|
flocationmeta.Clear;
|
||||||
flexicalblockfilemeta.Clear;
|
flexicalblockfilemeta.Clear;
|
||||||
fdefmeta.free;
|
fdefmeta.free;
|
||||||
fsymdecl.Clear;
|
fstaticvarsymdecl.Clear;
|
||||||
{ one item per def, plus some extra space in case of nested types,
|
{ one item per def, plus some extra space in case of nested types,
|
||||||
externally used types etc (it will grow further if necessary) }
|
externally used types etc (it will grow further if necessary) }
|
||||||
i:=current_module.localsymtable.DefList.count*4;
|
i:=current_module.localsymtable.DefList.count*4;
|
||||||
@ -531,7 +531,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if (hp.typ=ait_llvmdecl) and
|
if (hp.typ=ait_llvmdecl) and
|
||||||
assigned(taillvmdecl(hp).sym) then
|
assigned(taillvmdecl(hp).sym) then
|
||||||
sym_set_decl(taillvmdecl(hp).sym,hp);
|
staticvarsym_set_decl(taillvmdecl(hp).sym,taillvmdecl(hp));
|
||||||
hp:=tai(hp.next);
|
hp:=tai(hp.next);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1832,7 +1832,7 @@ implementation
|
|||||||
dispflags: tsymstr;
|
dispflags: tsymstr;
|
||||||
islocal: boolean;
|
islocal: boolean;
|
||||||
begin
|
begin
|
||||||
decl:=sym_get_decl(sym);
|
decl:=staticvarsym_get_decl(sym);
|
||||||
if not assigned(decl) then
|
if not assigned(decl) then
|
||||||
begin
|
begin
|
||||||
list.concat(tai_comment.create(strpnew('no declaration found for '+sym.mangledname)));
|
list.concat(tai_comment.create(strpnew('no declaration found for '+sym.mangledname)));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user