mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-01 17:44:55 +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}
|
||||
include(moduleflags,mf_llvm);
|
||||
{$endif}
|
||||
{$ifdef symansistr}
|
||||
include(moduleflags,mf_symansistr);
|
||||
{$endif}
|
||||
|
||||
old_docrc:=ppufile.do_crc;
|
||||
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_package_deny, { this unit must not be part of 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;
|
||||
|
||||
|
@ -234,6 +234,7 @@ var
|
||||
UnitList: TPpuContainerDef;
|
||||
CurUnit: TPpuModuleDef;
|
||||
SkipVersionCheck: boolean;
|
||||
SymAnsiStr: boolean;
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
@ -661,6 +662,14 @@ end;
|
||||
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;
|
||||
|
||||
procedure readrecsymtableoptions;
|
||||
@ -3147,10 +3156,7 @@ begin
|
||||
write ([space,' DefaultConst : ']);
|
||||
readderef('');
|
||||
if (vo_has_mangledname in varoptions) then
|
||||
if tsystemcpu(ppufile.header.common.cpu)=cpu_jvm then
|
||||
writeln([space,'AMangledname : ',getansistring])
|
||||
else
|
||||
writeln([space,'SMangledname : ',getstring]);
|
||||
writeln([space,'Mangledname : ',readsymstr(ppufile)]);
|
||||
if vo_has_section in varoptions then
|
||||
writeln(['Section name:',ppufile.getansistring]);
|
||||
write ([space,' FieldVarSymDeref: ']);
|
||||
@ -3575,10 +3581,7 @@ begin
|
||||
readcommondef('Procedure definition',defoptions,def);
|
||||
read_abstract_proc_def(calloption,procoptions,TPpuProcDef(def));
|
||||
if (po_has_mangledname in procoptions) then
|
||||
if tsystemcpu(ppufile.header.common.cpu)=cpu_jvm then
|
||||
writeln([space,' Mangled name : ',getansistring])
|
||||
else
|
||||
writeln([space,' Mangled name : ',getstring]);
|
||||
writeln([space,' Mangled name : ',readsymstr(ppufile)]);
|
||||
writeln([space,' Number : ',getword]);
|
||||
writeln([space,' Level : ',getbyte]);
|
||||
write ([space,' Class : ']);
|
||||
@ -4071,6 +4074,8 @@ begin
|
||||
CurUnit.LongVersion:=cardinal(getlongint);
|
||||
Writeln(['LongVersion: ',CurUnit.LongVersion]);
|
||||
getsmallset(CurUnit.ModuleFlags);
|
||||
if mf_symansistr in CurUnit.ModuleFlags then
|
||||
SymAnsiStr:=true;
|
||||
end;
|
||||
|
||||
ibmodulename :
|
||||
|
Loading…
Reference in New Issue
Block a user