diff options
| author | LemonBoy <thatlemon@gmail.com> | 2019-09-10 17:20:48 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-09-10 11:22:40 -0400 |
| commit | ba4d83af3e58ce2a34ccb945a297211333fd904c (patch) | |
| tree | ed998184da7c60d63b9293ff32084c95589bc0db /src/ir.cpp | |
| parent | e2c68fce89d7d308b445ed26025a674aff938151 (diff) | |
| download | zig-ba4d83af3e58ce2a34ccb945a297211333fd904c.tar.gz zig-ba4d83af3e58ce2a34ccb945a297211333fd904c.zip | |
Resolve lazy arguments passed to @compileLog
Closes #3193
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 56a12d2438..f29afdcf7b 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -19735,6 +19735,11 @@ static IrInstruction *ir_analyze_instruction_compile_log(IrAnalyze *ira, IrInstr if (type_is_invalid(msg->value.type)) return ira->codegen->invalid_instruction; buf_resize(&buf, 0); + if (msg->value.special == ConstValSpecialLazy) { + // Resolve any lazy value that's passed, we need its value + if (ir_resolve_lazy(ira->codegen, msg->source_node, &msg->value)) + return ira->codegen->invalid_instruction; + } render_const_value(ira->codegen, &buf, &msg->value); const char *comma_str = (i != 0) ? ", " : ""; fprintf(stderr, "%s%s", comma_str, buf_ptr(&buf)); |
