mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 15:09:22 +02:00
compiler: don't write zero ClassInfo pointer even if class does not have published methods rtti (issue #14930)
git-svn-id: trunk@14004 -
This commit is contained in:
parent
a13c657e69
commit
dfdfec0201
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -8188,6 +8188,7 @@ tests/test/tclass5.pp svneol=native#text/plain
|
||||
tests/test/tclass6.pp svneol=native#text/plain
|
||||
tests/test/tclass7.pp svneol=native#text/plain
|
||||
tests/test/tclass8.pp svneol=native#text/plain
|
||||
tests/test/tclassinfo1.pp svneol=native#text/pascal
|
||||
tests/test/tclrprop.pp svneol=native#text/plain
|
||||
tests/test/tcmp.pp svneol=native#text/plain
|
||||
tests/test/tcmp0.pp svneol=native#text/plain
|
||||
|
@ -1315,10 +1315,7 @@ implementation
|
||||
{ pointer to field table }
|
||||
current_asmdata.asmlists[al_globals].concat(Tai_const.Create_sym(fieldtablelabel));
|
||||
{ pointer to type info of published section }
|
||||
if (oo_can_have_published in _class.objectoptions) then
|
||||
current_asmdata.asmlists[al_globals].concat(Tai_const.Create_sym(RTTIWriter.get_rtti_label(_class,fullrtti)))
|
||||
else
|
||||
current_asmdata.asmlists[al_globals].concat(Tai_const.Create_sym(nil));
|
||||
current_asmdata.asmlists[al_globals].concat(Tai_const.Create_sym(RTTIWriter.get_rtti_label(_class,fullrtti)));
|
||||
{ inittable for con-/destruction }
|
||||
if _class.members_need_inittable then
|
||||
current_asmdata.asmlists[al_globals].concat(Tai_const.Create_sym(RTTIWriter.get_rtti_label(_class,initrtti)))
|
||||
|
11
tests/test/tclassinfo1.pp
Normal file
11
tests/test/tclassinfo1.pp
Normal file
@ -0,0 +1,11 @@
|
||||
program tclassinfo1;
|
||||
|
||||
{$apptype console}
|
||||
{$mode objfpc}{$H+}
|
||||
uses
|
||||
Classes;
|
||||
begin
|
||||
WriteLn(TObject.ClassInfo = TypeInfo(TObject));
|
||||
WriteLn(TPersistent.ClassInfo = TypeInfo(TPersistent));
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user