IC: codegen: fix (#17931)
This commit is contained in:
parent
01f316cf1f
commit
d67ae4afa6
1 changed files with 3 additions and 1 deletions
|
|
@ -2640,7 +2640,9 @@ proc genConstSetup(p: BProc; sym: PSym): bool =
|
||||||
result = lfNoDecl notin sym.loc.flags
|
result = lfNoDecl notin sym.loc.flags
|
||||||
|
|
||||||
proc genConstHeader(m, q: BModule; p: BProc, sym: PSym) =
|
proc genConstHeader(m, q: BModule; p: BProc, sym: PSym) =
|
||||||
assert(sym.loc.r != nil)
|
if sym.loc.r == nil:
|
||||||
|
if not genConstSetup(p, sym): return
|
||||||
|
assert(sym.loc.r != nil, $sym.name.s & $sym.itemId)
|
||||||
if m.hcrOn:
|
if m.hcrOn:
|
||||||
m.s[cfsVars].addf("static $1* $2;$n", [getTypeDesc(m, sym.loc.t, skVar), sym.loc.r]);
|
m.s[cfsVars].addf("static $1* $2;$n", [getTypeDesc(m, sym.loc.t, skVar), sym.loc.r]);
|
||||||
m.initProc.procSec(cpsLocals).addf(
|
m.initProc.procSec(cpsLocals).addf(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue