2
0
Эх сурвалжийг харах

* use ctai_typedconstbuilder.get_dynstring_rec() to get the recorddef representing
string constants instead of giving an internal error if we can't find it in
the current context (in most cases it will exist, but not when inlining a
routine from another unit that accesses a locally declared string constant)

git-svn-id: trunk@34373 -

Jonas Maebe 9 жил өмнө
parent
commit
18a59dddb9

+ 1 - 5
compiler/llvm/nllvmcon.pas

@@ -95,8 +95,6 @@ implementation
       var
       var
         stringtype: tstringtype;
         stringtype: tstringtype;
         strrecdef: trecorddef;
         strrecdef: trecorddef;
-        srsym: tsym;
-        srsymtable: tsymtable;
         offset: pint;
         offset: pint;
         field: tfieldvarsym;
         field: tfieldvarsym;
         llvmfield: tllvmshadowsymtableentry;
         llvmfield: tllvmshadowsymtableentry;
@@ -115,9 +113,7 @@ implementation
             internalerror(2014040804);
             internalerror(2014040804);
         end;
         end;
         { get the recorddef for this string constant }
         { get the recorddef for this string constant }
-        if not searchsym_type(ctai_typedconstbuilder.get_dynstring_rec_name(stringtype,winlikewidestring,len),srsym,srsymtable) then
-          internalerror(2014080405);
-        strrecdef:=trecorddef(ttypesym(srsym).typedef);
+        strrecdef:=ctai_typedconstbuilder.get_dynstring_rec(stringtype,winlikewidestring,len);
         { offset in the record of the the string data }
         { offset in the record of the the string data }
         offset:=ctai_typedconstbuilder.get_string_symofs(stringtype,winlikewidestring);
         offset:=ctai_typedconstbuilder.get_string_symofs(stringtype,winlikewidestring);
         { field corresponding to this offset }
         { field corresponding to this offset }