Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/8.0] Implement support for InlineArray in the trimmer #92107

Merged
merged 2 commits into from
Sep 15, 2023

Commits on Sep 15, 2023

  1. Implement support for InlineArray in the trimmer

    Types annotated with `InlineArray` need to preserve all of their fields, even if otherwise this would not be the case. It's possible to have a struct with `LayoutKind.Auto` and with `InlineArray` - trimmer would normally trim fields on such struct. This leads to corruption since the field is never accessed directly.
    
    This changes the marking to preserve all fields on a type with `InlineArray` attribute just like we would for explicit layout struct and similar other types.
    
    Adds tests to cover both the explicit usage of `InlineArray` attribute as well as the compiler generate usage via collection literals.
    vitek-karas authored and github-actions committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    da62c0f View commit details
    Browse the repository at this point in the history
  2. Update src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/InlineA…

    …rrayDataflow.cs
    
    Co-authored-by: Sven Boemer <sbomer@gmail.com>
    2 people authored and github-actions committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    2537ec6 View commit details
    Browse the repository at this point in the history