diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-03 20:04:47 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:40:04 -0700 |
| commit | 85c69c51945d7fb5d4cd2dea03fdb7915ecc55fa (patch) | |
| tree | 2705f666129a04e8100861d056f6df9bb89fd582 /src/arch/x86_64/CodeGen.zig | |
| parent | fb16ad3add77eff23f9c5dbaf802fdecfb4c8cc0 (diff) | |
| download | zig-85c69c51945d7fb5d4cd2dea03fdb7915ecc55fa.tar.gz zig-85c69c51945d7fb5d4cd2dea03fdb7915ecc55fa.zip | |
Type.isSlice: make it InternPool aware
Diffstat (limited to 'src/arch/x86_64/CodeGen.zig')
| -rw-r--r-- | src/arch/x86_64/CodeGen.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig index 3e0ca4831b..ad67a0db3d 100644 --- a/src/arch/x86_64/CodeGen.zig +++ b/src/arch/x86_64/CodeGen.zig @@ -8688,7 +8688,7 @@ fn isNull(self: *Self, inst: Air.Inst.Index, opt_ty: Type, opt_mcv: MCValue) !MC var ptr_buf: Type.SlicePtrFieldTypeBuffer = undefined; const some_info: struct { off: i32, ty: Type } = if (opt_ty.optionalReprIsPayload(mod)) - .{ .off = 0, .ty = if (pl_ty.isSlice()) pl_ty.slicePtrFieldType(&ptr_buf) else pl_ty } + .{ .off = 0, .ty = if (pl_ty.isSlice(mod)) pl_ty.slicePtrFieldType(&ptr_buf) else pl_ty } else .{ .off = @intCast(i32, pl_ty.abiSize(mod)), .ty = Type.bool }; @@ -8781,7 +8781,7 @@ fn isNullPtr(self: *Self, inst: Air.Inst.Index, ptr_ty: Type, ptr_mcv: MCValue) var ptr_buf: Type.SlicePtrFieldTypeBuffer = undefined; const some_info: struct { off: i32, ty: Type } = if (opt_ty.optionalReprIsPayload(mod)) - .{ .off = 0, .ty = if (pl_ty.isSlice()) pl_ty.slicePtrFieldType(&ptr_buf) else pl_ty } + .{ .off = 0, .ty = if (pl_ty.isSlice(mod)) pl_ty.slicePtrFieldType(&ptr_buf) else pl_ty } else .{ .off = @intCast(i32, pl_ty.abiSize(mod)), .ty = Type.bool }; |
