浏览代码

* fix internalerror if adding the object info for LLVM requires creating new defs

git-svn-id: trunk@44061 -
Jonas Maebe 5 年之前
父节点
当前提交
df6516c29f
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      compiler/llvm/nllvmutil.pas

+ 6 - 0
compiler/llvm/nllvmutil.pas

@@ -208,6 +208,10 @@ implementation
     begin
     begin
       inherited;
       inherited;
 
 
+      { insert newly created defs in the implementation rather than interface symtable
+        (the interface symtable is sealed at this point) }
+      symtablestack.push(current_module.localsymtable);
+
       { add the llvm.compiler.used array }
       { add the llvm.compiler.used array }
       InsertUsedList(current_module.llvmcompilerusedsyms,'llvm.compiler.used');
       InsertUsedList(current_module.llvmcompilerusedsyms,'llvm.compiler.used');
       { add the llvm.used array }
       { add the llvm.used array }
@@ -223,6 +227,8 @@ implementation
           inserttypeinfo;
           inserttypeinfo;
           free;
           free;
         end;
         end;
+
+      symtablestack.pop(current_module.localsymtable);
     end;
     end;