Hello,
I'm trying to use inline to remove unnecessary debugging code, such as
the following code, with FPC 2.3.1 on Windows, when compiling for
production.
However when I compile the code, at O1 optimisation level (my default),
the call to DebugInfo is still present in the generated assembler.
Is there a way to completely remove a call to an empty non-virtual
operation without ifdefing it?
Best regards,
Thierry
>>>> Start of demo code... ><<<
{$Inline on}
type
TForm1 = class(TForm)
private
procedure DebugInfo; inline;
public
procedure DoSomething;
end;
...
Implementation
procedure TForm1.DebugInfo;
begin
{$ifdef debug}
DebugInfo
{$endif}
end;
procedure TForm1.DoSomething;
begin
DebugInfo;
end;
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal