mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 16:59:12 +02:00
* fixed ansi/unicodestring constants on non-llvm/darwin platforms after
r28327 git-svn-id: branches/hlcgllvm@28404 -
This commit is contained in:
parent
5c75b6dd6b
commit
6e09fcb744
@ -534,6 +534,7 @@ implementation
|
|||||||
function ttai_lowleveltypedconstbuilder.emit_string_const_common(list: TAsmList; stringtype: tstringtype; len: asizeint; encoding: tstringencoding; out startlab: tasmlabel): tasmlabofs;
|
function ttai_lowleveltypedconstbuilder.emit_string_const_common(list: TAsmList; stringtype: tstringtype; len: asizeint; encoding: tstringencoding; out startlab: tasmlabel): tasmlabofs;
|
||||||
var
|
var
|
||||||
string_symofs: asizeint;
|
string_symofs: asizeint;
|
||||||
|
charptrdef: tdef;
|
||||||
elesize: word;
|
elesize: word;
|
||||||
begin
|
begin
|
||||||
current_asmdata.getdatalabel(result.lab);
|
current_asmdata.getdatalabel(result.lab);
|
||||||
@ -547,9 +548,15 @@ implementation
|
|||||||
{ element size }
|
{ element size }
|
||||||
case stringtype of
|
case stringtype of
|
||||||
st_ansistring:
|
st_ansistring:
|
||||||
elesize:=1;
|
begin
|
||||||
|
elesize:=1;
|
||||||
|
charptrdef:=charpointertype;
|
||||||
|
end;
|
||||||
st_unicodestring:
|
st_unicodestring:
|
||||||
elesize:=2;
|
begin
|
||||||
|
elesize:=2;
|
||||||
|
charptrdef:=widecharpointertype;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
internalerror(2014080401);
|
internalerror(2014080401);
|
||||||
end;
|
end;
|
||||||
@ -567,7 +574,7 @@ implementation
|
|||||||
if string_symofs=0 then
|
if string_symofs=0 then
|
||||||
begin
|
begin
|
||||||
{ results in slightly more efficient code }
|
{ results in slightly more efficient code }
|
||||||
list.concat(tai_label.create(result.lab));
|
emit_tai(tai_label.create(result.lab),charptrdef);
|
||||||
result.ofs:=0;
|
result.ofs:=0;
|
||||||
current_asmdata.getdatalabel(startlab);
|
current_asmdata.getdatalabel(startlab);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user