Fix destructor injections for global variables (#11230)
* attach global destructors at end of mainModule * Add testcase * Minor cleanup * Inject topLevelVar temporaries' destructors early * Fix megatest
This commit is contained in:
parent
a3e27ffa2c
commit
0c869eaa47
7 changed files with 45 additions and 8 deletions
|
|
@ -71,6 +71,7 @@ type
|
|||
onDefinition*: proc (graph: ModuleGraph; s: PSym; info: TLineInfo) {.nimcall.}
|
||||
onDefinitionResolveForward*: proc (graph: ModuleGraph; s: PSym; info: TLineInfo) {.nimcall.}
|
||||
onUsage*: proc (graph: ModuleGraph; s: PSym; info: TLineInfo) {.nimcall.}
|
||||
globalDestructors*: seq[PNode]
|
||||
|
||||
TPassContext* = object of RootObj # the pass's context
|
||||
PPassContext* = ref TPassContext
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue