diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-02-17 23:53:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-17 23:53:43 -0500 |
| commit | 39207fa1d46ccaf55de80e1afd89fbccca6a73e7 (patch) | |
| tree | adc43427b2ea4a30fba1cf12c5fa8117187ebe06 /src/ir.cpp | |
| parent | 7e549540527fec891bc67d5e657f82b7087530a3 (diff) | |
| parent | c70ee9177e5b0095c152b66fe8f22cd870e778b9 (diff) | |
| download | zig-39207fa1d46ccaf55de80e1afd89fbccca6a73e7.tar.gz zig-39207fa1d46ccaf55de80e1afd89fbccca6a73e7.zip | |
Merge pull request #1963 from matthew-mcallister/dedup-compile-log-warning
Deduplicate compile log statement warnings
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 0fcbb60fe8..063be4e952 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -17194,9 +17194,13 @@ static IrInstruction *ir_analyze_instruction_compile_log(IrAnalyze *ira, IrInstr } fprintf(stderr, "\n"); - // Here we bypass higher level functions such as ir_add_error because we do not want - // invalidate_exec to be called. - add_node_error(ira->codegen, instruction->base.source_node, buf_sprintf("found compile log statement")); + auto *expr = &instruction->base.source_node->data.fn_call_expr; + if (!expr->seen) { + // Here we bypass higher level functions such as ir_add_error because we do not want + // invalidate_exec to be called. + add_node_error(ira->codegen, instruction->base.source_node, buf_sprintf("found compile log statement")); + } + expr->seen = true; return ir_const_void(ira, &instruction->base); } |
