Browse Source

* make symbols generated in procedures global when auto-inlining is on

git-svn-id: trunk@25285 -
florian 12 years ago
parent
commit
e147895f80
1 changed files with 6 additions and 1 deletions
  1. 6 1
      compiler/symsym.pas

+ 6 - 1
compiler/symsym.pas

@@ -1667,7 +1667,12 @@ implementation
            not(tf_smartlink_sections in target_info.flags)) or
           DLLSource or
           (assigned(current_procinfo) and
-           (po_inline in current_procinfo.procdef.procoptions)) or
+           ((po_inline in current_procinfo.procdef.procoptions) or
+            { globalasmsym is called normally before the body of a subroutine is parsed
+              so we cannot know if it will be auto inlined, so make all symbols of it
+              global if asked }
+            (cs_opt_autoinline in current_settings.optimizerswitches))
+          ) or
           (vo_is_public in varoptions);
       end;