mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:09:30 +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;
|
||||
offset: pint;
|
||||
field: tfieldvarsym;
|
||||
llvmfield: tllvmshadowsymtableentry;
|
||||
dataptrdef: tdef;
|
||||
reg: tregister;
|
||||
href: treference;
|
||||
@ -121,6 +122,9 @@ implementation
|
||||
offset:=ctai_typedconstbuilder.get_string_symofs(stringtype,winlikewidestring);
|
||||
{ field corresponding to this 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 }
|
||||
dataptrdef:=getpointerdef(field.vardef);
|
||||
{ load the address of the string data }
|
||||
|
Loading…
Reference in New Issue
Block a user