mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 11:25:58 +02:00
* fixed stabs generation for static class variables
git-svn-id: trunk@3614 -
This commit is contained in:
parent
6dde68da3a
commit
3261281184
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6821,6 +6821,7 @@ tests/webtbs/tw5015.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw5023.pp svneol=native#text/plain
|
tests/webtbs/tw5023.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw5036.pp svneol=native#text/plain
|
tests/webtbs/tw5036.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw5082.pp -text svneol=unset#text/plain
|
tests/webtbs/tw5082.pp -text svneol=unset#text/plain
|
||||||
|
tests/webtbs/tw6435.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw6491.pp svneol=native#text/plain
|
tests/webtbs/tw6491.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw6624.pp svneol=native#text/plain
|
tests/webtbs/tw6624.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw6684.pp svneol=native#text/plain
|
tests/webtbs/tw6684.pp svneol=native#text/plain
|
||||||
|
@ -163,6 +163,7 @@ interface
|
|||||||
constructor create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
constructor create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
|
function mangledname:string;override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tabstractnormalvarsym = class(tabstractvarsym)
|
tabstractnormalvarsym = class(tabstractvarsym)
|
||||||
@ -1416,6 +1417,22 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function tfieldvarsym.mangledname:string;
|
||||||
|
var
|
||||||
|
srsym : tsym;
|
||||||
|
srsymtable : tsymtable;
|
||||||
|
begin
|
||||||
|
if sp_static in symoptions then
|
||||||
|
begin
|
||||||
|
searchsym(lower(owner.name^)+'_'+name,srsym,srsymtable);
|
||||||
|
if assigned(srsym) then
|
||||||
|
result:=srsym.mangledname;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
result:=inherited mangledname;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TABSTRACTNORMALVARSYM
|
TABSTRACTNORMALVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
14
tests/webtbs/tw6435.pp
Normal file
14
tests/webtbs/tw6435.pp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ %OPT=-gl }
|
||||||
|
program Project1;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}{$static on}
|
||||||
|
|
||||||
|
type
|
||||||
|
MyClass = class(TObject)
|
||||||
|
private
|
||||||
|
FClassVar: integer; static;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user