Skip to content

Commit

Permalink
[jit] Avoid calling mono_aot_direct_icalls_enabled_for_method () in n…
Browse files Browse the repository at this point in the history
…on-aot mode, it might be a stub if aot is disabled. (dotnet#31754)

Co-authored-by: Zoltan Varga <[email protected]>
  • Loading branch information
monojenkins and vargaz authored Feb 5, 2020
1 parent eed80d9 commit d1f80f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mono/mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2175,7 +2175,7 @@ direct_icalls_enabled (MonoCompile *cfg, MonoMethod *method)
if (cfg->gen_sdb_seq_points || cfg->disable_direct_icalls)
return FALSE;

if (method && mono_aot_direct_icalls_enabled_for_method (cfg, method))
if (method && cfg->compile_aot && mono_aot_direct_icalls_enabled_for_method (cfg, method))
return TRUE;

/* LLVM on amd64 can't handle calls to non-32 bit addresses */
Expand Down

0 comments on commit d1f80f1

Please sign in to comment.