Merge pull request #4955 from cheatfate/debugcommit1
Generate `NimMainModule` name for main module.
This commit is contained in:
commit
b6807b547d
1 changed files with 8 additions and 2 deletions
|
|
@ -972,7 +972,13 @@ proc getSomeInitName(m: PSym, suffix: string): Rope =
|
||||||
result.add m.name.s
|
result.add m.name.s
|
||||||
result.add suffix
|
result.add suffix
|
||||||
|
|
||||||
proc getInitName(m: PSym): Rope = getSomeInitName(m, "Init000")
|
proc getInitName(m: PSym): Rope =
|
||||||
|
if sfMainModule in m.flags:
|
||||||
|
# generate constant name for main module, for "easy" debugging.
|
||||||
|
result = rope"NimMainModule"
|
||||||
|
else:
|
||||||
|
result = getSomeInitName(m, "Init000")
|
||||||
|
|
||||||
proc getDatInitName(m: PSym): Rope = getSomeInitName(m, "DatInit000")
|
proc getDatInitName(m: PSym): Rope = getSomeInitName(m, "DatInit000")
|
||||||
|
|
||||||
proc registerModuleToMain(m: PSym) =
|
proc registerModuleToMain(m: PSym) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue