* (again) fixed loading the address of the string data of an ansi/

unicodestring constants: specify the type of the pointer to the
    string record (which is indirect) rather than that of the string
    array (which will implicitly be the result of the getelementptr)

git-svn-id: trunk@31256 -
This commit is contained in:
Jonas Maebe 2015-07-30 16:58:19 +00:00
parent d7f6744f7b
commit 9a8a323578

View File

@ -129,10 +129,10 @@ implementation
dataptrdef:=cpointerdef.getreusable(field.vardef);
{ load the address of the string data }
reg:=hlcg.getaddressregister(current_asmdata.CurrAsmList,dataptrdef);
reference_reset_symbol(href, lab_str, 0, const_align(strpointerdef.size));
reference_reset_symbol(href,lab_str,0,const_align(strpointerdef.size));
current_asmdata.CurrAsmList.concat(
taillvm.getelementptr_reg_size_ref_size_const(reg,dataptrdef,href,
s32inttype,field.llvmfieldnr,false));
taillvm.getelementptr_reg_size_ref_size_const(reg,cpointerdef.getreusable(strrecdef),href,
s32inttype,field.llvmfieldnr,true));
{ convert into a pointer to the individual elements }
hlcg.a_load_reg_reg(current_asmdata.CurrAsmList,dataptrdef,strpointerdef,reg,location.register);
end;