codegen for user-defined destructors
This commit is contained in:
parent
4f45097f87
commit
337e1ecc7c
4 changed files with 87 additions and 2 deletions
|
|
@ -1054,4 +1054,11 @@ proc getReturnType*(s: PSym): PType =
|
|||
proc getSize(typ: PType): biggestInt =
|
||||
result = computeSize(typ)
|
||||
if result < 0: InternalError("getSize(" & $typ.kind & ')')
|
||||
|
||||
proc instantiateDestructor*(typ: PType): bool =
|
||||
# return true if the type already had a user-defined
|
||||
# destructor or if the compiler generated a default
|
||||
# member-wise one
|
||||
if typ.destructor != nil: return true
|
||||
return false
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue