mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 11:25:58 +02:00
* record in ppu flag whether or not symbols are ansistrings, and use that
flag in ppudump rather than hardcoding targets (it's also the case for LLVM) git-svn-id: trunk@42312 -
This commit is contained in:
parent
789f13eb24
commit
cc9f8b7f56
@ -1021,6 +1021,9 @@ var
|
|||||||
{$ifdef llvm}
|
{$ifdef llvm}
|
||||||
include(moduleflags,mf_llvm);
|
include(moduleflags,mf_llvm);
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$ifdef symansistr}
|
||||||
|
include(moduleflags,mf_symansistr);
|
||||||
|
{$endif}
|
||||||
|
|
||||||
old_docrc:=ppufile.do_crc;
|
old_docrc:=ppufile.do_crc;
|
||||||
ppufile.do_crc:=false;
|
ppufile.do_crc:=false;
|
||||||
|
@ -377,7 +377,8 @@ interface
|
|||||||
mf_i8086_ss_equals_ds, { this unit uses an i8086 memory model with SS=DS (i.e. tiny, small or medium) }
|
mf_i8086_ss_equals_ds, { this unit uses an i8086 memory model with SS=DS (i.e. tiny, small or medium) }
|
||||||
mf_package_deny, { this unit must not be part of a package }
|
mf_package_deny, { this unit must not be part of a package }
|
||||||
mf_package_weak, { this unit may be completely contained in a package }
|
mf_package_weak, { this unit may be completely contained in a package }
|
||||||
mf_llvm { compiled for LLVM code generator, not compatible with regular compiler because of different nodes in inline functions }
|
mf_llvm, { compiled for LLVM code generator, not compatible with regular compiler because of different nodes in inline functions }
|
||||||
|
mf_symansistr { symbols are ansistrings (for ppudump) }
|
||||||
);
|
);
|
||||||
tmoduleflags = set of tmoduleflag;
|
tmoduleflags = set of tmoduleflag;
|
||||||
|
|
||||||
|
@ -234,6 +234,7 @@ var
|
|||||||
UnitList: TPpuContainerDef;
|
UnitList: TPpuContainerDef;
|
||||||
CurUnit: TPpuModuleDef;
|
CurUnit: TPpuModuleDef;
|
||||||
SkipVersionCheck: boolean;
|
SkipVersionCheck: boolean;
|
||||||
|
SymAnsiStr: boolean;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
@ -661,6 +662,14 @@ end;
|
|||||||
Read Routines
|
Read Routines
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
|
function readsymstr(ppufile: tppufile): ansistring;
|
||||||
|
begin
|
||||||
|
if not(mf_symansistr in CurUnit.ModuleFlags) then
|
||||||
|
result:=ppufile.getstring
|
||||||
|
else
|
||||||
|
result:=ppufile.getansistring;
|
||||||
|
end;
|
||||||
|
|
||||||
function readmanagementoperatoroptions(const space : string;const name : string):tmanagementoperators;forward;
|
function readmanagementoperatoroptions(const space : string;const name : string):tmanagementoperators;forward;
|
||||||
|
|
||||||
procedure readrecsymtableoptions;
|
procedure readrecsymtableoptions;
|
||||||
@ -3147,10 +3156,7 @@ begin
|
|||||||
write ([space,' DefaultConst : ']);
|
write ([space,' DefaultConst : ']);
|
||||||
readderef('');
|
readderef('');
|
||||||
if (vo_has_mangledname in varoptions) then
|
if (vo_has_mangledname in varoptions) then
|
||||||
if tsystemcpu(ppufile.header.common.cpu)=cpu_jvm then
|
writeln([space,'Mangledname : ',readsymstr(ppufile)]);
|
||||||
writeln([space,'AMangledname : ',getansistring])
|
|
||||||
else
|
|
||||||
writeln([space,'SMangledname : ',getstring]);
|
|
||||||
if vo_has_section in varoptions then
|
if vo_has_section in varoptions then
|
||||||
writeln(['Section name:',ppufile.getansistring]);
|
writeln(['Section name:',ppufile.getansistring]);
|
||||||
write ([space,' FieldVarSymDeref: ']);
|
write ([space,' FieldVarSymDeref: ']);
|
||||||
@ -3575,10 +3581,7 @@ begin
|
|||||||
readcommondef('Procedure definition',defoptions,def);
|
readcommondef('Procedure definition',defoptions,def);
|
||||||
read_abstract_proc_def(calloption,procoptions,TPpuProcDef(def));
|
read_abstract_proc_def(calloption,procoptions,TPpuProcDef(def));
|
||||||
if (po_has_mangledname in procoptions) then
|
if (po_has_mangledname in procoptions) then
|
||||||
if tsystemcpu(ppufile.header.common.cpu)=cpu_jvm then
|
writeln([space,' Mangled name : ',readsymstr(ppufile)]);
|
||||||
writeln([space,' Mangled name : ',getansistring])
|
|
||||||
else
|
|
||||||
writeln([space,' Mangled name : ',getstring]);
|
|
||||||
writeln([space,' Number : ',getword]);
|
writeln([space,' Number : ',getword]);
|
||||||
writeln([space,' Level : ',getbyte]);
|
writeln([space,' Level : ',getbyte]);
|
||||||
write ([space,' Class : ']);
|
write ([space,' Class : ']);
|
||||||
@ -4071,6 +4074,8 @@ begin
|
|||||||
CurUnit.LongVersion:=cardinal(getlongint);
|
CurUnit.LongVersion:=cardinal(getlongint);
|
||||||
Writeln(['LongVersion: ',CurUnit.LongVersion]);
|
Writeln(['LongVersion: ',CurUnit.LongVersion]);
|
||||||
getsmallset(CurUnit.ModuleFlags);
|
getsmallset(CurUnit.ModuleFlags);
|
||||||
|
if mf_symansistr in CurUnit.ModuleFlags then
|
||||||
|
SymAnsiStr:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ibmodulename :
|
ibmodulename :
|
||||||
|
Loading…
Reference in New Issue
Block a user