summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/ccgtypes.nim15
1 files changed, 12 insertions, 3 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim
index 65f938ca0..1a9a5a766 100644
--- a/compiler/ccgtypes.nim
+++ b/compiler/ccgtypes.nim
@@ -1612,11 +1612,20 @@ proc genTypeInfoV1(m: BModule; t: PType; info: TLineInfo): Rope =
 
   result = prefixTI.rope & result & ")".rope
 
-proc genTypeSection(m: BModule; n: PNode) =
-  discard
-
 proc genTypeInfo*(config: ConfigRef, m: BModule; t: PType; info: TLineInfo): Rope =
   if optTinyRtti in config.globalOptions:
     result = genTypeInfoV2(m, t, info)
   else:
     result = genTypeInfoV1(m, t, info)
+
+proc genTypeSection(m: BModule, n: PNode) = 
+  var intSet = initIntSet()
+  for i in 0..<n.len:
+    if len(n[i]) == 0: continue
+    if n[i][0].kind != nkPragmaExpr: continue
+    for p in 0..<n[i][0].len:
+      if (n[i][0][p].kind != nkSym): continue
+      if sfExportc in n[i][0][p].sym.flags:        
+        discard getTypeDescAux(m, n[i][0][p].typ, intSet, n[i][0][p].sym.kind)
+        if m.g.generatedHeader != nil:
+          discard getTypeDescAux(m.g.generatedHeader, n[i][0][p].typ, intSet, n[i][0][p].sym.kind)
\ No newline at end of file