mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 14:09:20 +02:00
* search dynamic string data record in correct symtable in
tllvmtai_typedconstbuilder.emit_string_offset o fixes LLVM internalerror 2014080406 for test/tcustomattr14 git-svn-id: trunk@42464 -
This commit is contained in:
parent
12e63d8a2c
commit
145f4299b4
@ -412,13 +412,12 @@ implementation
|
|||||||
|
|
||||||
procedure tllvmtai_typedconstbuilder.emit_string_offset(const ll: tasmlabofs; const strlength: longint; const st: tstringtype; const winlikewidestring: boolean; const charptrdef: tdef);
|
procedure tllvmtai_typedconstbuilder.emit_string_offset(const ll: tasmlabofs; const strlength: longint; const st: tstringtype; const winlikewidestring: boolean; const charptrdef: tdef);
|
||||||
var
|
var
|
||||||
srsym : tsym;
|
|
||||||
srsymtable: tsymtable;
|
|
||||||
strrecdef : trecorddef;
|
strrecdef : trecorddef;
|
||||||
strdef: tdef;
|
strdef: tdef;
|
||||||
offset: pint;
|
offset: pint;
|
||||||
field: tfieldvarsym;
|
field: tfieldvarsym;
|
||||||
dataptrdef: tdef;
|
dataptrdef: tdef;
|
||||||
|
typesym: ttypesym;
|
||||||
begin
|
begin
|
||||||
{ nil pointer? }
|
{ nil pointer? }
|
||||||
if not assigned(ll.lab) then
|
if not assigned(ll.lab) then
|
||||||
@ -434,9 +433,10 @@ implementation
|
|||||||
if ll.ofs<>0 then
|
if ll.ofs<>0 then
|
||||||
begin
|
begin
|
||||||
{ get the recorddef for this string constant }
|
{ get the recorddef for this string constant }
|
||||||
if not searchsym_type(ctai_typedconstbuilder.get_dynstring_rec_name(st,winlikewidestring,strlength),srsym,srsymtable) then
|
typesym:=try_search_current_module_type(ctai_typedconstbuilder.get_dynstring_rec_name(st,winlikewidestring,strlength));
|
||||||
|
if not assigned(typesym) then
|
||||||
internalerror(2014080406);
|
internalerror(2014080406);
|
||||||
strrecdef:=trecorddef(ttypesym(srsym).typedef);
|
strrecdef:=trecorddef(typesym.typedef);
|
||||||
{ offset in the record of the the string data }
|
{ offset in the record of the the string data }
|
||||||
offset:=ctai_typedconstbuilder.get_string_symofs(st,winlikewidestring);
|
offset:=ctai_typedconstbuilder.get_string_symofs(st,winlikewidestring);
|
||||||
{ field corresponding to this offset }
|
{ field corresponding to this offset }
|
||||||
|
Loading…
Reference in New Issue
Block a user