Add line directives for C code variables
This commit is contained in:
parent
b2c5f8a05f
commit
344e3cbc05
1 changed files with 3 additions and 0 deletions
|
|
@ -566,6 +566,9 @@ proc localVarDecl(p: BProc; n: PNode): Rope =
|
||||||
if s.kind == skLet: incl(s.loc.flags, lfNoDeepCopy)
|
if s.kind == skLet: incl(s.loc.flags, lfNoDeepCopy)
|
||||||
if s.kind in {skLet, skVar, skField, skForVar} and s.alignment > 0:
|
if s.kind in {skLet, skVar, skField, skForVar} and s.alignment > 0:
|
||||||
result.addf("NIM_ALIGN($1) ", [rope(s.alignment)])
|
result.addf("NIM_ALIGN($1) ", [rope(s.alignment)])
|
||||||
|
|
||||||
|
genCLineDir(result, toFullPath(p.config, n.info), n.info.safeLineNm, p.config)
|
||||||
|
|
||||||
result.add getTypeDesc(p.module, s.typ, skVar)
|
result.add getTypeDesc(p.module, s.typ, skVar)
|
||||||
if s.constraint.isNil:
|
if s.constraint.isNil:
|
||||||
if sfRegister in s.flags: result.add(" register")
|
if sfRegister in s.flags: result.add(" register")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue