Procházet zdrojové kódy

RTTI: don't generate full RTTI for internal types

These are types created by the code generator for internal purposes, and hence
are never queried by user code
Jonas Maebe před 2 roky
rodič
revize
49fb1b4c29
1 změnil soubory, kde provedl 9 přidání a 6 odebrání
  1. 9 6
      compiler/ncgrtti.pas

+ 9 - 6
compiler/ncgrtti.pas

@@ -168,12 +168,15 @@ implementation
                (ds_init_table_used in def.defstates) then
               RTTIWriter.write_rtti(def,initrtti);
             { RTTI }
-            if (
-                assigned(def.typesym) and
-                is_global and
-                not is_objc_class_or_protocol(def)
-               ) or
-               (ds_rtti_table_used in def.defstates) then
+            if not(df_internal in def.defoptions) and
+               (
+                (
+                 assigned(def.typesym) and
+                 is_global and
+                 not is_objc_class_or_protocol(def)
+                ) or
+                (ds_rtti_table_used in def.defstates)
+               ) then
               RTTIWriter.write_rtti(def,fullrtti);
           end;
       end;