| ... | @@ -4319,10 +4319,9 @@ pub fn ensureFuncBodyAnalyzed(mod: *Module, func: *Fn) SemaError!void { | ... | @@ -4319,10 +4319,9 @@ pub fn ensureFuncBodyAnalyzed(mod: *Module, func: *Fn) SemaError!void { |
| 4319 | comp.emit_llvm_bc == null); | 4319 | comp.emit_llvm_bc == null); |
| 4320 | | 4320 | |
| 4321 | const dump_air = builtin.mode == .Debug and comp.verbose_air; | 4321 | const dump_air = builtin.mode == .Debug and comp.verbose_air; |
| | 4322 | const dump_llvm_ir = builtin.mode == .Debug and comp.verbose_llvm_ir; |
| 4322 | | 4323 | |
| 4323 | if (no_bin_file and !dump_air) { | 4324 | if (no_bin_file and !dump_air and !dump_llvm_ir) return; |
| 4324 | return; | | |
| 4325 | } | | |
| 4326 | | 4325 | |
| 4327 | log.debug("analyze liveness of {s}", .{decl.name}); | 4326 | log.debug("analyze liveness of {s}", .{decl.name}); |
| 4328 | var liveness = try Liveness.analyze(gpa, air); | 4327 | var liveness = try Liveness.analyze(gpa, air); |
| ... | @@ -4337,9 +4336,7 @@ pub fn ensureFuncBodyAnalyzed(mod: *Module, func: *Fn) SemaError!void { | ... | @@ -4337,9 +4336,7 @@ pub fn ensureFuncBodyAnalyzed(mod: *Module, func: *Fn) SemaError!void { |
| 4337 | std.debug.print("# End Function AIR: {s}\n\n", .{fqn}); | 4336 | std.debug.print("# End Function AIR: {s}\n\n", .{fqn}); |
| 4338 | } | 4337 | } |
| 4339 | | 4338 | |
| 4340 | if (no_bin_file) { | 4339 | if (no_bin_file and !dump_llvm_ir) return; |
| 4341 | return; | | |
| 4342 | } | | |
| 4343 | | 4340 | |
| 4344 | comp.bin_file.updateFunc(mod, func, air, liveness) catch |err| switch (err) { | 4341 | comp.bin_file.updateFunc(mod, func, air, liveness) catch |err| switch (err) { |
| 4345 | error.OutOfMemory => return error.OutOfMemory, | 4342 | error.OutOfMemory => return error.OutOfMemory, |
| ... | @@ -6484,7 +6481,14 @@ pub fn populateTestFunctions(mod: *Module) !void { | ... | @@ -6484,7 +6481,14 @@ pub fn populateTestFunctions(mod: *Module) !void { |
| 6484 | pub fn linkerUpdateDecl(mod: *Module, decl_index: Decl.Index) !void { | 6481 | pub fn linkerUpdateDecl(mod: *Module, decl_index: Decl.Index) !void { |
| 6485 | const comp = mod.comp; | 6482 | const comp = mod.comp; |
| 6486 | | 6483 | |
| 6487 | if (comp.bin_file.options.emit == null) return; | 6484 | const no_bin_file = (comp.bin_file.options.emit == null and |
| | 6485 | comp.emit_asm == null and |
| | 6486 | comp.emit_llvm_ir == null and |
| | 6487 | comp.emit_llvm_bc == null); |
| | 6488 | |
| | 6489 | const dump_llvm_ir = builtin.mode == .Debug and comp.verbose_llvm_ir; |
| | 6490 | |
| | 6491 | if (no_bin_file and !dump_llvm_ir) return; |
| 6488 | | 6492 | |
| 6489 | const decl = mod.declPtr(decl_index); | 6493 | const decl = mod.declPtr(decl_index); |
| 6490 | | 6494 | |