Selaa lähdekoodia

- Don't output 'begin/end asmlist xxx' comments for empty asmlists.

git-svn-id: trunk@26744 -
sergei 11 vuotta sitten
vanhempi
commit
74089039e7
1 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 6 3
      compiler/aggas.pas

+ 6 - 3
compiler/aggas.pas

@@ -1668,9 +1668,12 @@ implementation
 
       for hal:=low(TasmlistType) to high(TasmlistType) do
         begin
-          AsmWriteLn(target_asm.comment+'Begin asmlist '+AsmlistTypeStr[hal]);
-          writetree(current_asmdata.asmlists[hal]);
-          AsmWriteLn(target_asm.comment+'End asmlist '+AsmlistTypeStr[hal]);
+          if not (current_asmdata.asmlists[hal].empty) then
+            begin
+              AsmWriteLn(target_asm.comment+'Begin asmlist '+AsmlistTypeStr[hal]);
+              writetree(current_asmdata.asmlists[hal]);
+              AsmWriteLn(target_asm.comment+'End asmlist '+AsmlistTypeStr[hal]);
+            end;
         end;
 
       { add weak symbol markers }