浏览代码

* 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 年之前
父节点
当前提交
18a59dddb9
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      compiler/llvm/nllvmcon.pas

+ 1 - 5
compiler/llvm/nllvmcon.pas

@@ -95,8 +95,6 @@ implementation
       var
         stringtype: tstringtype;
         strrecdef: trecorddef;
-        srsym: tsym;
-        srsymtable: tsymtable;
         offset: pint;
         field: tfieldvarsym;
         llvmfield: tllvmshadowsymtableentry;
@@ -115,9 +113,7 @@ implementation
             internalerror(2014040804);
         end;
         { 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:=ctai_typedconstbuilder.get_string_symofs(stringtype,winlikewidestring);
         { field corresponding to this offset }