From 51783510b9b972fab52d429ff3311b0fe8402e42 Mon Sep 17 00:00:00 2001 From: Matthew McAllister Date: Thu, 14 Feb 2019 15:54:37 -0800 Subject: Deduplicate compile log statement warnings --- src/ir.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/ir.cpp') 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); } -- cgit v1.2.3