diff --git a/src/codegen.cpp b/src/codegen.cpp index e7d07688e9dad..db21394b3e61c 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4746,6 +4746,8 @@ static std::unique_ptr emit_function(jl_lambda_info_t *lam, jl_llvm_func } } + builder.ClearInsertionPoint(); + // step 14, Apply LLVM level inlining for(std::vector::iterator it = ctx.to_inline.begin(); it != ctx.to_inline.end(); ++it) { Function *inlinef = (*it)->getCalledFunction();