Răsfoiți Sursa

+ support for tabstractlocalsymtable.iscurrentunit(). Required so that we
don't generate imports for nested routines in the llvm code generator,
as we check whether we have to do this based on whether or not the
procdef's owner is in the current unit (and that owner is a localsymtable
in case of a nested routine)
o nested calls now work with the llvm code generator

git-svn-id: branches/hlcgllvm@27139 -

Jonas Maebe 11 ani în urmă
părinte
comite
103414136d
1 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  1. 8 0
      compiler/symtable.pas

+ 8 - 0
compiler/symtable.pas

@@ -171,6 +171,7 @@ interface
        public
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           function count_locals:longint;
+          function iscurrentunit: boolean; override;
        end;
 
        tlocalsymtable = class(tabstractlocalsymtable)
@@ -1925,6 +1926,13 @@ implementation
          end;
       end;
 
+    function tabstractlocalsymtable.iscurrentunit: boolean;
+      begin
+        Result:=
+          assigned(defowner) and
+          defowner.owner.iscurrentunit;
+      end;
+
 
 {****************************************************************************
                               TLocalSymtable