From bc2c709e18b72b31b4f65ff6b9b14b9229da491e Mon Sep 17 00:00:00 2001 From: Krzysztof Wolicki Date: Fri, 23 Oct 2026 10:34:40 +0200 Subject: [PATCH] Fix missing argument changes --- lib/std/zig/llvm/BitcodeReader.zig | 2 +- lib/std/zig/llvm/bitcode_writer.zig | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/std/zig/llvm/BitcodeReader.zig b/lib/std/zig/llvm/BitcodeReader.zig index 4c990e30229f4b028c61b091de87ae0eeeea12fe..345b0e40c630e854dcb35b3f75201946733817d7 100644 --- a/lib/std/zig/llvm/BitcodeReader.zig +++ b/lib/std/zig/llvm/BitcodeReader.zig @@ -228,7 +228,7 @@ fn nextRecord(bc: *BitcodeReader) !?Record { @fromBackingInt(@intCast(try bc.readFixed(u3, 3))); try operands.append(record_arena.allocator(), @backingInt(encoding)); switch (encoding) { - .fixed, .vbr => try operands.append(try bc.readVbr(u7, 5)), + .fixed, .vbr => try operands.append(record_arena.allocator(), try bc.readVbr(u7, 5)), .array, .char6, .blob => {}, _ => return error.UnsuportedAbbrevEncoding, } diff --git a/lib/std/zig/llvm/bitcode_writer.zig b/lib/std/zig/llvm/bitcode_writer.zig index 819ac61d9e7a1e705fedba68164664773aa007c3..05966f6213bc4820994e02cecea236b6f9d53e1a 100644 --- a/lib/std/zig/llvm/bitcode_writer.zig +++ b/lib/std/zig/llvm/bitcode_writer.zig @@ -38,7 +38,7 @@ pub fn BitcodeWriter(comptime types: []const type) type { }; } - pub fn deinit(self: BcWriter) void { + pub fn deinit(self: *BcWriter) void { self.buffer.deinit(self.allocator); } @@ -145,7 +145,7 @@ pub fn BitcodeWriter(comptime types: []const type) type { pub fn writeBlob(self: *BcWriter, blob: []const u8) Error!void { const blob_word_size = std.mem.alignForward(usize, blob.len, 4); - try self.buffer.ensureUnusedCapacity(blob_word_size + 1); + try self.buffer.ensureUnusedCapacity(self.allocator, blob_word_size + 1); self.alignTo32() catch unreachable; const slice = self.buffer.addManyAsSliceAssumeCapacity(blob_word_size / 4); @@ -157,7 +157,7 @@ pub fn BitcodeWriter(comptime types: []const type) type { pub fn alignTo32(self: *BcWriter) Error!void { if (self.bit_count == 0) return; - try self.buffer.append(std.mem.nativeToLittle(u32, self.bit_buffer)); + try self.buffer.append(self.allocator, std.mem.nativeToLittle(u32, self.bit_buffer)); self.bit_buffer = 0; self.bit_count = 0; } -- 2.54.0