Paul Ishenin wrote:
Michael Van Canneyt wrote:
Maybe generate partial RTTI for classes not in $M+ ?
I think it is already generated since TypeInfo(TObject) returns data but probably not written by the compiler to the vmtTypeInfo offset.
Indeed so. Look at attached patch.

Best regards,
Paul Ishenin.
Index: compiler/nobj.pas
===================================================================
--- compiler/nobj.pas   (revision 13961)
+++ compiler/nobj.pas   (working copy)
@@ -1315,10 +1315,7 @@
             { 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)))
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to