Skip to content

Suppress useless IL2080 warnings in fallback paths - #1515

Merged
Sergio Pedri (Sergio0694) merged 3 commits into
staging/AOTfrom
user/sergiopedri/suppress-invalid-il2080
Mar 13, 2024
Merged

Sergio Pedri (Sergio0694) merged 3 commits into
staging/AOTfrom
user/sergiopedri/suppress-invalid-il2080

Conversation

@Sergio0694

@Sergio0694 Sergio Pedri (Sergio0694) commented Feb 22, 2024 •

Copy link
Copy Markdown
Member

This PR suppresses a bunch of IL2080 warnings for MakeGenericCalls that we know are actually safe. The warnings come from the fact the ABI type arguments are passed to type parameters using the unmanaged constraint, which implies struct, which implies new(), which in turn implies [DynamicallyAccessedMemebrs(PublicParameterlessConstructor)]. Because we know that all our ABI types are just blittable and will never have a constructor, we can just safely suppress these warnings.

Note

I recommend reviewing this with whitespace hidden.

@Sergio0694
Sergio Pedri (Sergio0694) force-pushed the user/sergiopedri/guard-mgt-calls branch from b473692 to 6b5e475 Compare February 29, 2024 18:35
@Sergio0694
Sergio Pedri (Sergio0694) force-pushed the user/sergiopedri/guard-mgt-calls branch 2 times, most recently from 05d472f to 306fb63 Compare March 12, 2024 21:32
Base automatically changed from user/sergiopedri/guard-mgt-calls to staging/AOT March 13, 2024 00:28
@Sergio0694
Sergio Pedri (Sergio0694) marked this pull request as ready for review March 13, 2024 00:33
@Sergio0694
Sergio Pedri (Sergio0694) changed the base branch from staging/AOT to master March 13, 2024 00:35
@Sergio0694
Sergio Pedri (Sergio0694) changed the base branch from master to staging/AOT March 13, 2024 00:35
@Sergio0694
Sergio Pedri (Sergio0694) force-pushed the user/sergiopedri/suppress-invalid-il2080 branch from e5d32d9 to a03c11a Compare March 13, 2024 18:25
@Sergio0694
Sergio Pedri (Sergio0694) merged commit 0ff7507 into staging/AOT Mar 13, 2024
@Sergio0694
Sergio Pedri (Sergio0694) deleted the user/sergiopedri/suppress-invalid-il2080 branch March 13, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants