| ... | ... | @@ -577,6 +577,7 @@ pub const Type = enum(u32) { |
| 577 | 577 | |
| 578 | 578 | pub fn isSized(self: Type, builder: *const Builder) Allocator.Error!bool { |
| 579 | 579 | var visited: IsSizedVisited = .{}; |
| 580 | defer visited.deinit(builder.gpa); |
| 580 | 581 | const result = try self.isSizedVisited(&visited, builder); |
| 581 | 582 | if (builder.useLibLlvm()) assert(result == self.toLlvm(builder).isSized().toBool()); |
| 582 | 583 | return result; |
| ... | ... | @@ -4766,6 +4767,7 @@ pub const Function = struct { |
| 4766 | 4767 | if (self.metadata) |metadata| gpa.free(metadata[0..self.instructions.len]); |
| 4767 | 4768 | gpa.free(self.names[0..self.instructions.len]); |
| 4768 | 4769 | self.instructions.deinit(gpa); |
| 4770 | gpa.free(self.blocks); |
| 4769 | 4771 | self.* = undefined; |
| 4770 | 4772 | } |
| 4771 | 4773 | |
| ... | ... | @@ -6579,10 +6581,16 @@ pub const WipFunction = struct { |
| 6579 | 6581 | |
| 6580 | 6582 | pub fn deinit(self: *WipFunction) void { |
| 6581 | 6583 | self.extra.deinit(self.builder.gpa); |
| 6584 | self.metadata.deinit(self.builder.gpa); |
| 6585 | self.names.deinit(self.builder.gpa); |
| 6582 | 6586 | self.instructions.deinit(self.builder.gpa); |
| 6583 | 6587 | for (self.blocks.items) |*b| b.instructions.deinit(self.builder.gpa); |
| 6584 | 6588 | self.blocks.deinit(self.builder.gpa); |
| 6585 | | if (self.builder.useLibLlvm()) self.llvm.builder.dispose(); |
| 6589 | if (self.builder.useLibLlvm()) { |
| 6590 | self.llvm.instructions.deinit(self.builder.gpa); |
| 6591 | self.llvm.blocks.deinit(self.builder.gpa); |
| 6592 | self.llvm.builder.dispose(); |
| 6593 | } |
| 6586 | 6594 | self.* = undefined; |
| 6587 | 6595 | } |
| 6588 | 6596 | |