From a73b723c1dd33654a743f343da3db4538661ebd7 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 14 Jan 2018 22:06:52 +0000 Subject: [PATCH] * when using a dummy file position for an interface wrapper, set the module to the current module. This is required in case of -al, because when writing source lines to the assembly output the input file position gets changed. Since the wrappers are generated at the end of a unit's compilation, that's no problem if that input file belongs to the current unit. It was hardcoded to the unit with id 1 before though, which is the main unit specified on the command line and that one could be different (fixes compilation of win32 buildrtl with -al after r37961) git-svn-id: trunk@37973 - --- compiler/ncgvmt.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ncgvmt.pas b/compiler/ncgvmt.pas index 6a6fe56b14..d205379223 100644 --- a/compiler/ncgvmt.pas +++ b/compiler/ncgvmt.pas @@ -1311,7 +1311,7 @@ implementation current_filepos:=pd.fileinfo else begin - current_filepos.moduleindex:=1; + current_filepos.moduleindex:=current_module.unit_index; current_filepos.fileindex:=1; current_filepos.line:=1; current_filepos.column:=1;