Move member variable "section" to tprocdef. Type of "section" to agree with symansistr define.

This commit is contained in:
ccrause 2022-02-22 07:46:19 +02:00 committed by FPK
parent 738a0a35de
commit 665c1b3966
3 changed files with 14 additions and 1 deletions

View File

@ -5497,8 +5497,13 @@ implementation
alt:=al_pure_assembler;
{ add the procedure to the al_procedures }
maybe_new_object_file(current_asmdata.asmlists[alt]);
{$ifdef symansistr}
if pd.section<>'' then
new_proc_section(current_asmdata.asmlists[alt],sec_user,lower(pd.section),getprocalign)
{$else symansistr}
if assigned(pd.section) then
new_proc_section(current_asmdata.asmlists[alt],sec_user,lower(pd.section^),getprocalign)
{$endif symansistr}
else
new_section(current_asmdata.asmlists[alt],sec_code,lower(pd.mangledname),getprocalign);
current_asmdata.asmlists[alt].concatlist(code);

View File

@ -2422,7 +2422,11 @@ begin
internalerror(2021032801);
if not (target_info.system in systems_allow_section) then
Comment(V_Error,'Directive section not allowed for this target.');
{$ifdef symansistr}
tprocdef(pd).section:=get_stringconst;
{$else symansistr}
tprocdef(pd).section:=stringdup(get_stringconst);
{$endif}
end;
type

View File

@ -695,7 +695,6 @@ interface
{ number of user visible parameters }
maxparacount,
minparacount : byte;
section : ansistring;
constructor create(dt:tdeftyp;level:byte;doregister:boolean);
constructor ppuload(dt:tdeftyp;ppufile:tcompilerppufile);
destructor destroy;override;
@ -866,6 +865,11 @@ interface
visibility : tvisibility;
{$ifndef DISABLE_FAST_OVERLOAD_PATCH}
seenmarker : pointer; // used for filtering in tcandidate
{$endif}
{$ifdef symansistr}
section: ansistring;
{$else symansistr}
section: pshortstring;
{$endif}
constructor create(level:byte;doregister:boolean);virtual;
constructor ppuload(ppufile:tcompilerppufile);