소스 검색

* Optimize parentfp when optimization level 1 and higher to be debugger friendly.

git-svn-id: trunk@45661 -
yury 5 년 전
부모
커밋
11fd466394
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      compiler/ncgcal.pas

+ 3 - 1
compiler/ncgcal.pas

@@ -143,12 +143,14 @@ implementation
         pd: tprocdef;
       begin
         { The parameter can be optimized as unused when:
+            optimization level 1 and higher
             this is a direct call to a routine, not a procvar
             and the routine is not an exception filter
             and the parameter is not used by the routine
             and implementation of the routine is already processed.
         }
-        result:=assigned(parasym.Owner) and
+        result:=(cs_opt_level1 in current_settings.optimizerswitches) and
+          assigned(parasym.Owner) and
           (parasym.Owner.defowner.typ=procdef);
         if not result then
           exit;