| ... | @@ -2157,7 +2157,7 @@ pub const Type = extern union { | ... | @@ -2157,7 +2157,7 @@ pub const Type = extern union { |
| 2157 | const child_type = self.optionalChild(&buf); | 2157 | const child_type = self.optionalChild(&buf); |
| 2158 | if (!child_type.hasCodeGenBits()) return 1; | 2158 | if (!child_type.hasCodeGenBits()) return 1; |
| 2159 | | 2159 | |
| 2160 | if (child_type.zigTypeTag() == .Pointer and !child_type.isCPtr()) | 2160 | if (child_type.zigTypeTag() == .Pointer and !child_type.isCPtr() and !child_type.isSlice()) |
| 2161 | return @divExact(target.cpu.arch.ptrBitWidth(), 8); | 2161 | return @divExact(target.cpu.arch.ptrBitWidth(), 8); |
| 2162 | | 2162 | |
| 2163 | // Optional types are represented as a struct with the child type as the first | 2163 | // Optional types are represented as a struct with the child type as the first |
| ... | @@ -2344,7 +2344,7 @@ pub const Type = extern union { | ... | @@ -2344,7 +2344,7 @@ pub const Type = extern union { |
| 2344 | const child_type = ty.optionalChild(&buf); | 2344 | const child_type = ty.optionalChild(&buf); |
| 2345 | if (!child_type.hasCodeGenBits()) return 8; | 2345 | if (!child_type.hasCodeGenBits()) return 8; |
| 2346 | | 2346 | |
| 2347 | if (child_type.zigTypeTag() == .Pointer and !child_type.isCPtr()) | 2347 | if (child_type.zigTypeTag() == .Pointer and !child_type.isCPtr() and !child_type.isSlice()) |
| 2348 | return target.cpu.arch.ptrBitWidth(); | 2348 | return target.cpu.arch.ptrBitWidth(); |
| 2349 | | 2349 | |
| 2350 | // Optional types are represented as a struct with the child type as the first | 2350 | // Optional types are represented as a struct with the child type as the first |