Browse Source

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

git-svn-id: trunk@44061 -
Jonas Maebe 5 years ago
parent
commit
df6516c29f
1 changed files with 6 additions and 0 deletions
  1. 6 0
      compiler/llvm/nllvmutil.pas

+ 6 - 0
compiler/llvm/nllvmutil.pas

@@ -208,6 +208,10 @@ implementation
     begin
       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 }
       InsertUsedList(current_module.llvmcompilerusedsyms,'llvm.compiler.used');
       { add the llvm.used array }
@@ -223,6 +227,8 @@ implementation
           inserttypeinfo;
           free;
         end;
+
+      symtablestack.pop(current_module.localsymtable);
     end;