Skip to content

Commit

Permalink
[mono] AOT instances of SZGenericArrayEnumerator for primitive types,…
Browse files Browse the repository at this point in the history
… its needed by the IEnumerable wrappers for arrays. (#50681)
  • Loading branch information
vargaz authored Apr 3, 2021
1 parent c6a525a commit 787c7c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mono/mono/mini/aot-compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -5810,6 +5810,10 @@ add_generic_instances (MonoAotCompile *acfg)
if (klass)
add_instances_of (acfg, klass, insts, ninsts, TRUE);

klass = mono_class_try_load_from_name (acfg->image, "System", "SZGenericArrayEnumerator`1");
if (klass)
add_instances_of (acfg, klass, insts, ninsts, TRUE);

/*
* Add a managed-to-native wrapper of Array.GetGenericValue_icall<object>, which is
* used for all instances of GetGenericValue_icall by the AOT runtime.
Expand Down

0 comments on commit 787c7c7

Please sign in to comment.