From fd6b7b160d1fddf967177cf26704908aa7bf5f12 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 10 Dec 2019 12:28:28 -0500 Subject: improve dynamic library API --- src/ir.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index 5a15b64549..8b588b5dee 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -6561,6 +6561,7 @@ static IrInstruction *ir_gen_prefix_op_id(IrBuilder *irb, Scope *scope, AstNode } static IrInstruction *ir_expr_wrap(IrBuilder *irb, Scope *scope, IrInstruction *inst, ResultLoc *result_loc) { + if (inst == irb->codegen->invalid_instruction) return inst; ir_build_end_expr(irb, scope, inst->source_node, inst, result_loc); return inst; } -- cgit v1.2.3