mirror of
https://github.com/ziglang/zig.git
synced 2025-12-12 17:23:09 +00:00
LLVM Builder: Pass correct argument to ensureUnusedMetadataCapacity
The trail_len was being multiplied by the size of the type before
This commit is contained in:
parent
4870e002f2
commit
efb00c20ee
@ -12007,7 +12007,7 @@ pub fn debugExpression(
|
||||
self: *Builder,
|
||||
elements: []const u32,
|
||||
) Allocator.Error!Metadata {
|
||||
try self.ensureUnusedMetadataCapacity(1, Metadata.Expression, elements.len * @sizeOf(u32));
|
||||
try self.ensureUnusedMetadataCapacity(1, Metadata.Expression, elements.len);
|
||||
return self.debugExpressionAssumeCapacity(elements);
|
||||
}
|
||||
|
||||
@ -12015,7 +12015,7 @@ pub fn debugTuple(
|
||||
self: *Builder,
|
||||
elements: []const Metadata,
|
||||
) Allocator.Error!Metadata {
|
||||
try self.ensureUnusedMetadataCapacity(1, Metadata.Tuple, elements.len * @sizeOf(Metadata));
|
||||
try self.ensureUnusedMetadataCapacity(1, Metadata.Tuple, elements.len);
|
||||
return self.debugTupleAssumeCapacity(elements);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user