mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 16:06:22 +02:00
+ introduced cgbase.topcg2str and topcmp2str for converting TOpCg and TOpCmp to strings (useful for debug logging, etc)
This commit is contained in:
parent
139f2dfe84
commit
2e65a5d458
@ -511,6 +511,8 @@ interface
|
||||
function double_array_cgsize(const a: tcgint): tcgsize;{$ifdef USEINLINE}inline;{$endif}
|
||||
|
||||
function tcgsize2str(cgsize: tcgsize):string;
|
||||
function topcg2str(opcg: topcg):string;
|
||||
function topcmp2str(opcmp: topcmp):string;
|
||||
|
||||
{ return the inverse condition of opcmp }
|
||||
function inverse_opcmp(opcmp: topcmp): topcmp;{$ifdef USEINLINE}inline;{$endif}
|
||||
@ -873,6 +875,18 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function topcg2str(opcg: topcg):string;
|
||||
begin
|
||||
Str(opcg, Result);
|
||||
end;
|
||||
|
||||
|
||||
function topcmp2str(opcmp: topcmp):string;
|
||||
begin
|
||||
Str(opcmp, Result);
|
||||
end;
|
||||
|
||||
|
||||
function inverse_opcmp(opcmp: topcmp): topcmp;{$ifdef USEINLINE}inline;{$endif}
|
||||
const
|
||||
list: array[TOpCmp] of TOpCmp =
|
||||
|
Loading…
Reference in New Issue
Block a user