mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:49:09 +02:00
* ensure that the llvmst is initialised before using a field's llvmfieldnr
(and at the same time take advantage of this to perform a sanity check) git-svn-id: trunk@31061 -
This commit is contained in:
parent
89c4bd8522
commit
b176ed9f80
@ -99,6 +99,7 @@ implementation
|
|||||||
srsymtable: tsymtable;
|
srsymtable: tsymtable;
|
||||||
offset: pint;
|
offset: pint;
|
||||||
field: tfieldvarsym;
|
field: tfieldvarsym;
|
||||||
|
llvmfield: tllvmshadowsymtableentry;
|
||||||
dataptrdef: tdef;
|
dataptrdef: tdef;
|
||||||
reg: tregister;
|
reg: tregister;
|
||||||
href: treference;
|
href: treference;
|
||||||
@ -121,6 +122,9 @@ implementation
|
|||||||
offset:=ctai_typedconstbuilder.get_string_symofs(stringtype,winlikewidestring);
|
offset:=ctai_typedconstbuilder.get_string_symofs(stringtype,winlikewidestring);
|
||||||
{ field corresponding to this offset }
|
{ field corresponding to this offset }
|
||||||
field:=trecordsymtable(strrecdef.symtable).findfieldbyoffset(offset);
|
field:=trecordsymtable(strrecdef.symtable).findfieldbyoffset(offset);
|
||||||
|
llvmfield:=trecordsymtable(strrecdef.symtable).llvmst[field];
|
||||||
|
if llvmfield.fieldoffset<>field.fieldoffset then
|
||||||
|
internalerror(2015061001);
|
||||||
{ pointerdef to the string data array }
|
{ pointerdef to the string data array }
|
||||||
dataptrdef:=getpointerdef(field.vardef);
|
dataptrdef:=getpointerdef(field.vardef);
|
||||||
{ load the address of the string data }
|
{ load the address of the string data }
|
||||||
|
Loading…
Reference in New Issue
Block a user