| author | |
| committer | |
| log | 08d6876d20303458a4a108300d5a2492e8bd7856 |
| tree | 225cad31ec259f712cf1a7149f67ffdd1804314f |
| parent | 19e56638694dddf1b9137a352abf31df7952c5eb |
1 files changed, 4 insertions(+), 1 deletions(-)
src/codegen/c.zig+4-1| ... | ... | @@ -2165,7 +2165,10 @@ fn airIsNull( |
| 2165 | 2165 | |
| 2166 | 2166 | const ty = f.air.typeOf(un_op); |
| 2167 | 2167 | var opt_buf: Type.Payload.ElemType = undefined; |
| 2168 | const payload_type = ty.optionalChild(&opt_buf); | |
| 2168 | const payload_type = if (ty.zigTypeTag() == .Pointer) | |
| 2169 | ty.childType().optionalChild(&opt_buf) | |
| 2170 | else | |
| 2171 | ty.optionalChild(&opt_buf); | |
| 2169 | 2172 | |
| 2170 | 2173 | if (ty.isPtrLikeOptional()) { |
| 2171 | 2174 | // operand is a regular pointer, test `operand !=/== NULL` |