aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 40aabcae36..cca07c2a34 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -165,6 +165,10 @@ emit_docs: ?EmitLoc,
work_queue_wait_group: WaitGroup,
astgen_wait_group: WaitGroup,
+/// Exported symbol names. This is only for when the target is wasm.
+/// TODO: Remove this when Stage2 becomes the default compiler as it will already have this information.
+export_symbol_names: std.ArrayListUnmanaged([]const u8) = .{},
+
pub const SemaError = Module.SemaError;
pub const CRTFile = struct {
@@ -1877,6 +1881,11 @@ pub fn destroy(self: *Compilation) void {
self.work_queue_wait_group.deinit();
self.astgen_wait_group.deinit();
+ for (self.export_symbol_names.items) |symbol_name| {
+ self.gpa.free(symbol_name);
+ }
+ self.export_symbol_names.deinit(self.gpa);
+
// This destroys `self`.
self.arena_state.promote(gpa).deinit();
}