Remove GenericArraySortHelper from ILLinkTrim xml#37286
Remove GenericArraySortHelper from ILLinkTrim xml#37286joperezr merged 3 commits intodotnet:masterfrom
Conversation
|
Tagging subscribers to this area: @ViktorHofer |
|
I have validated that if I trim a simple Console app that calls Array.Sort methods these don't get trimmed. @MichalStrehovsky @sbomer if I remove the Array.Sort calls I was expecting the .ctor of those types to get trimmed but that wasn't the case, and when I analyzed the dumped report I got that the linker kept them because: The wierd part here, is that if I remove the attributes I'm adding in this PR, and don't use Array.Sort, I would have expected the .ctor to still be kept as found by the report above given there is still something rooting it, but the .ctor is actually not present. Is this by design? |
...coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs
Outdated
Show resolved
Hide resolved
Type is getting rooted by the The PreserveDependency ensures the constructor is kept (even though the code as-is won't actually use the ctor because |
|
Hello @joperezr! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Remove the GenericArraySortHelper from ILLinkTrim and instead move them into attributes where they are being used.