diff --git a/src/errors.jl b/src/errors.jl index 065248a845..89024dadb3 100644 --- a/src/errors.jl +++ b/src/errors.jl @@ -606,7 +606,7 @@ end if isa(cur, LLVM.InsertValueInst) B2 = IRBuilder() - position!(B2, LLVM.Instruction(LLVM.API.LLVMGetNextInstruction(cur))) + position!(B2, LLVM.Instruction(LLVM.API.LLVMGetNextInstruction(ncur))) lhs = make_replacement(operands(cur)[1], B2) if illegal