This commit is contained in:
Andreas Rumpf
2020-07-08 18:59:34 +02:00
committed by GitHub
parent 27579cfd3a
commit bc712c28fc
2 changed files with 2 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ proc declareThreadVar(m: BModule, s: PSym, isExtern: bool) =
proc generateThreadLocalStorage(m: BModule) =
if m.g.nimtv != nil and (usesThreadVars in m.flags or sfMainModule in m.module.flags):
for t in items(m.g.nimtvDeps): discard getTypeDesc(m, t)
finishTypeDescriptions(m)
m.s[cfsSeqTypes].addf("typedef struct {$1} NimThreadVars;$n", [m.g.nimtv])
proc generateThreadVarsSize(m: BModule) =

View File

@@ -944,6 +944,7 @@ proc finishTypeDescriptions(m: BModule) =
else:
discard getTypeDescAux(m, t, check)
inc(i)
m.typeStack.setLen 0
template cgDeclFrmt*(s: PSym): string =
s.constraint.strVal