From 197708f0dd818031dfbbdc67fe8560c458974fa6 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 14 Jan 2021 18:58:55 -0500 Subject: [PATCH] aotcompile: avoid cache lookup when disallowed Fix #38548 --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 70daecb6fb61e..a4ffb0a760e5e 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4620,7 +4620,7 @@ static Function *emit_tojlinvoke(jl_code_instance_t *codeinst, Module *M, jl_cod ctx.builder.SetInsertPoint(b0); Function *theFunc; Value *theFarg; - if (codeinst->invoke != NULL) { + if (params.cache && codeinst->invoke != NULL) { StringRef theFptrName = jl_ExecutionEngine->getFunctionAtAddress((uintptr_t)codeinst->invoke, codeinst); theFunc = cast( M->getOrInsertFunction(theFptrName, jlinvoke_func->_type(jl_LLVMContext)).getCallee());