aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/c.zig2
-rw-r--r--src/codegen/llvm.zig3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index ff472f7375..54e13db9a1 100644
--- a/src/codegen/c.zig
+++ b/src/codegen/c.zig
@@ -5429,7 +5429,7 @@ fn airStructFieldVal(f: *Function, inst: Air.Inst.Index) !CValue {
const bit_offset_ty = try mod.intType(.unsigned, Type.smallestUnsignedBits(int_info.bits - 1));
- const bit_offset = struct_type.fieldBitOffset(ip, extra.field_index);
+ const bit_offset = mod.structPackedFieldBitOffset(struct_type, extra.field_index);
const bit_offset_val = try mod.intValue(bit_offset_ty, bit_offset);
const field_int_signedness = if (inst_ty.isAbiInt(mod))
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 7057516a51..dc2e2f3859 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -6192,7 +6192,6 @@ pub const FuncGen = struct {
fn airStructFieldVal(self: *FuncGen, body_tail: []const Air.Inst.Index) !Builder.Value {
const o = self.dg.object;
const mod = o.module;
- const ip = &mod.intern_pool;
const inst = body_tail[0];
const ty_pl = self.air.instructions.items(.data)[inst].ty_pl;
const struct_field = self.air.extraData(Air.StructField, ty_pl.payload).data;
@@ -6208,7 +6207,7 @@ pub const FuncGen = struct {
.Struct => switch (struct_ty.containerLayout(mod)) {
.Packed => {
const struct_type = mod.typeToStruct(struct_ty).?;
- const bit_offset = struct_type.fieldBitOffset(ip, field_index);
+ const bit_offset = mod.structPackedFieldBitOffset(struct_type, field_index);
const containing_int = struct_llvm_val;
const shift_amt =
try o.builder.intValue(containing_int.typeOfWip(&self.wip), bit_offset);