aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-03-16 01:32:43 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-03-17 01:57:14 -0400
commitcfcd6698cd9385938df27a2052c2309229171e4f (patch)
tree3ac0ce351109462a9f0e96c5f06fe94737be48a8 /src/Module.zig
parent4ec299007a6a183edddfcb0505a9c1501da7ad0c (diff)
downloadzig-cfcd6698cd9385938df27a2052c2309229171e4f.tar.gz
zig-cfcd6698cd9385938df27a2052c2309229171e4f.zip
main: add debug option to dump unoptimized llvm ir
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Module.zig b/src/Module.zig
index c47e4fc234..17016865d1 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -4263,7 +4263,7 @@ pub fn ensureFuncBodyAnalyzed(mod: *Module, func: *Fn) SemaError!void {
comp.emit_llvm_bc == null);
const dump_air = builtin.mode == .Debug and comp.verbose_air;
- const dump_llvm_ir = builtin.mode == .Debug and comp.verbose_llvm_ir;
+ const dump_llvm_ir = builtin.mode == .Debug and (comp.verbose_llvm_ir != null or comp.verbose_llvm_bc != null);
if (no_bin_file and !dump_air and !dump_llvm_ir) return;
@@ -6395,7 +6395,7 @@ pub fn linkerUpdateDecl(mod: *Module, decl_index: Decl.Index) !void {
comp.emit_llvm_ir == null and
comp.emit_llvm_bc == null);
- const dump_llvm_ir = builtin.mode == .Debug and comp.verbose_llvm_ir;
+ const dump_llvm_ir = builtin.mode == .Debug and (comp.verbose_llvm_ir != null or comp.verbose_llvm_bc != null);
if (no_bin_file and !dump_llvm_ir) return;