--gc:destructors improvements (#12626)

* do not cache the noDestructors transformation
* liftdestructor: improvements
* undo bugfix
This commit is contained in:
Andreas Rumpf 2019-11-09 13:21:55 +01:00 • committed by GitHub
commit 82e0765fc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 14 deletions

View file

@ -1137,8 +1137,7 @@ proc transformBody*(g: ModuleGraph, prc: PSym, cache = true;
incl(result.flags, nfTransf)
let cache = cache or prc.typ.callConv == ccInline
if cache:
if cache or prc.typ.callConv == ccInline:
# genProc for inline procs will be called multiple times from different modules,
# it is important to transform exactly once to get sym ids and locations right
prc.transformedBody = result