diff options
| author | Matthew McAllister <matthew.mcallister.0@gmail.com> | 2019-02-14 15:54:37 -0800 |
|---|---|---|
| committer | Matthew McAllister <matthew.mcallister.0@gmail.com> | 2019-02-17 14:02:37 -0800 |
| commit | 51783510b9b972fab52d429ff3311b0fe8402e42 (patch) | |
| tree | e01041cba524688af54615406fb108247000d067 /src/ir.cpp | |
| parent | de18ece29436290cae3608d2c942e7e0a69f1a44 (diff) | |
| download | zig-51783510b9b972fab52d429ff3311b0fe8402e42.tar.gz zig-51783510b9b972fab52d429ff3311b0fe8402e42.zip | |
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); } |
