diff options
author | Arne Döring <arne.doering@gmx.net> | 2019-03-21 06:55:21 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-03-21 06:55:21 +0100 |
commit | 48d5e4f95cc36f3f2dba1f21b66efad1882d5d27 (patch) | |
tree | eba2c26f5e4e4f65f3b1eb0cb2f15ee38cff4150 | |
parent | 3794338aba2a085bc72761307b8849fff07ed429 (diff) | |
download | Nim-48d5e4f95cc36f3f2dba1f21b66efad1882d5d27.tar.gz |
add condition for szUnknown (#10869)
-rw-r--r-- | compiler/ccgtypes.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 51f04d076..f4864180e 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -246,8 +246,8 @@ proc cacheGetType(tab: TypeCache; sig: SigHash): Rope = result = tab.getOrDefault(sig) proc addAbiCheck(m: BModule, t: PType, name: Rope) = - if isDefined(m.config, "checkabi"): - addf(m.s[cfsTypeInfo], "NIM_CHECK_SIZE($1, $2);$n", [name, rope(getSize(m.config, t))]) + if isDefined(m.config, "checkabi") and (let size = getSize(m.config, t); size != szUnknownSize): + addf(m.s[cfsTypeInfo], "NIM_CHECK_SIZE($1, $2);$n", [name, rope(size)]) proc ccgIntroducedPtr(conf: ConfigRef; s: PSym): bool = var pt = skipTypes(s.typ, typedescInst) |