Quellcode durchsuchen

Fix cycle/build with -al

assemble.pas, TExternalAssembler.WriteSourceLine:
  * don't generate an internal error if no module is found; if the system unit is compiled with -al there can be cases when fileinfo contains only zeros (though I wonder where this comes from; I'll need to investigate this when I have time)

git-svn-id: trunk@23631 -
svenbarth vor 12 Jahren
Ursprung
Commit
a68e237450
1 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen
  1. 6 3
      compiler/assemble.pas

+ 6 - 3
compiler/assemble.pas

@@ -716,9 +716,12 @@ Implementation
               module:=current_module
             else
               module:=get_module(hp.fileinfo.moduleindex);
-            if not assigned(module) then
-              internalerror(2013021801);
-            infile:=module.sourcefiles.get_file(hp.fileinfo.fileindex);
+            { during the compilation of the system unit there are cases when
+              the fileinfo contains just zeros => invalid }
+            if assigned(module) then
+              infile:=module.sourcefiles.get_file(hp.fileinfo.fileindex)
+            else
+              infile:=nil;
             if assigned(infile) then
               begin
                 { open only if needed !! }