Ver Fonte

* (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 -

Jonas Maebe há 10 anos atrás
pai
commit
9a8a323578
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      compiler/llvm/nllvmcon.pas

+ 3 - 3
compiler/llvm/nllvmcon.pas

@@ -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;