aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 4edba007e9..396e92ed79 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -5612,6 +5612,18 @@ pub fn analyzeFnBody(mod: *Module, func: *Fn, arena: Allocator) SemaError!Air {
else => |e| return e,
};
+ {
+ var it = sema.unresolved_inferred_allocs.keyIterator();
+ while (it.next()) |ptr_inst| {
+ // The lack of a resolve_inferred_alloc means that this instruction
+ // is unused so it just has to be a no-op.
+ sema.air_instructions.set(ptr_inst.*, .{
+ .tag = .alloc,
+ .data = .{ .ty = Type.initTag(.single_const_pointer_to_comptime_int) },
+ });
+ }
+ }
+
// If we don't get an error return trace from a caller, create our own.
if (func.calls_or_awaits_errorable_fn and
mod.comp.bin_file.options.error_return_tracing and