Skip to content

Commit 2e1ac64

Browse files
authored
fix incorrect setting of inferred field in jl_get_llvmf_decl (code_native) (#24642)
1 parent 6d57635 commit 2e1ac64

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/codegen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,17 +1552,17 @@ void *jl_get_llvmf_decl(jl_method_instance_t *linfo, size_t world, bool getwrapp
15521552
}
15531553

15541554
// compile this normally
1555+
jl_code_info_t *src = NULL;
15551556
if (linfo->inferred == NULL)
1556-
linfo->inferred = jl_nothing;
1557-
jl_llvm_functions_t decls = jl_compile_linfo(&linfo, NULL, world, &jl_default_cgparams);
1557+
src = jl_type_infer(&linfo, world, 0);
1558+
jl_llvm_functions_t decls = jl_compile_linfo(&linfo, src, world, &jl_default_cgparams);
15581559

15591560
if (decls.functionObject == NULL && linfo->jlcall_api == JL_API_CONST && jl_is_method(linfo->def.method)) {
15601561
// normally we don't generate native code for these functions, so need an exception here
15611562
// This leaks a bit of memory to cache native code that we'll never actually need
15621563
JL_LOCK(&codegen_lock);
15631564
decls = linfo->functionObjectsDecls;
15641565
if (decls.functionObject == NULL) {
1565-
jl_code_info_t *src = NULL;
15661566
src = jl_type_infer(&linfo, world, 0);
15671567
if (!src) {
15681568
src = linfo->def.method->generator ? jl_code_for_staged(linfo) : (jl_code_info_t*)linfo->def.method->source;

0 commit comments

Comments
 (0)