mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-21 16:31:39 +00:00
exportc export all types not just those used by exported proc/globals Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user