mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:39:31 +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);
|
||||
var
|
||||
srsym : tsym;
|
||||
srsymtable: tsymtable;
|
||||
strrecdef : trecorddef;
|
||||
strdef: tdef;
|
||||
offset: pint;
|
||||
field: tfieldvarsym;
|
||||
dataptrdef: tdef;
|
||||
typesym: ttypesym;
|
||||
begin
|
||||
{ nil pointer? }
|
||||
if not assigned(ll.lab) then
|
||||
@ -434,9 +433,10 @@ implementation
|
||||
if ll.ofs<>0 then
|
||||
begin
|
||||
{ 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);
|
||||
strrecdef:=trecorddef(ttypesym(srsym).typedef);
|
||||
strrecdef:=trecorddef(typesym.typedef);
|
||||
{ offset in the record of the the string data }
|
||||
offset:=ctai_typedconstbuilder.get_string_symofs(st,winlikewidestring);
|
||||
{ field corresponding to this offset }
|
||||
|
Loading…
Reference in New Issue
Block a user