implemented optional pragma for implicit discard
This commit is contained in:
parent
033e3dfc50
commit
72ceda98cb
11 changed files with 53 additions and 21 deletions
|
|
@ -445,7 +445,7 @@ proc assignGlobalVar(p: BProc, s: PSym) =
|
|||
fillLoc(s.loc, locGlobalVar, s.typ, mangleName(s), OnHeap)
|
||||
useHeader(p.module, s)
|
||||
if lfNoDecl in s.loc.flags: return
|
||||
if sfThreadVar in s.flags:
|
||||
if sfThread in s.flags:
|
||||
declareThreadVar(p.module, s, sfImportc in s.flags)
|
||||
else:
|
||||
if sfImportc in s.flags: app(p.module.s[cfsVars], "extern ")
|
||||
|
|
@ -724,7 +724,7 @@ proc genVarPrototype(m: BModule, sym: PSym) =
|
|||
if sym.owner.id != m.module.id:
|
||||
# else we already have the symbol generated!
|
||||
assert(sym.loc.r != nil)
|
||||
if sfThreadVar in sym.flags:
|
||||
if sfThread in sym.flags:
|
||||
declareThreadVar(m, sym, true)
|
||||
else:
|
||||
app(m.s[cfsVars], "extern ")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue