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

Address remaining Ref.Emit ILLink warnings in Mono. #45723

Merged
merged 3 commits into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/libraries/illink-sharedframework.targets
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
<!-- Collate CoreLib suppression XML files not bin-placed in earlier per-library linker run. CoreLib doesn't use bin-place logic. -->
<_SuppressionsXmls Include="$(CoreLibSharedILLinkSuppressionsFilesPrefix).xml" />
<_SuppressionsXmls Condition="'$(TargetOS)' != 'windows'" Include="$(CoreLibSharedILLinkSuppressionsFilesPrefix).NonWindows.xml" />
<_SuppressionsXmls Condition="'$(RuntimeFlavor)' == 'Mono'" Include="$(MonoProjectRoot)netcore\System.Private.CoreLib\$(ProjectILLinkSuppressionsFile).xml" />

<!-- netstandard2.1-only System.ComponentModel.Annotations XML file is not bin-placed during -allConfigurations builds
due to the linker not being run on the assembly (eng\illink.targets). Manually include it. -->
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ private static MethodInfo ExtractBaseMethod(MethodInfo info)
}

// Called from the runtime to return the corresponding finished MethodInfo object
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2060:MakeGenericMethod",
Justification = "MethodOnTypeBuilderInst is Reflection.Emit's underlying implementation of MakeGenericMethod. " +
"Callers of the outer calls to MakeGenericMethod will be warned as appropriate.")]
internal MethodInfo RuntimeResolve()
{
Type type = instantiation.InternalResolve();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,8 @@ private bool has_ctor_method()
return this;
}

[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2074:UnrecognizedReflectionPattern",
Justification = "Linker doesn't analyze ResolveUserType but it's an identity function")]
private void ResolveUserTypes()
{
parent = ResolveUserType(parent);
Expand Down Expand Up @@ -1054,7 +1056,7 @@ public override Type GetElementType()
/* Needed to keep signature compatibility with MS.NET */
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicEvents)]
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2085:UnrecognizedReflectionPattern",
Justification = "Linker doesn't recongnize GetEvents(BindingFlags.Public) but this is what the body is doing")]
Justification = "Linker doesn't recognize GetEvents(BindingFlags.Public) but this is what the body is doing")]
public override EventInfo[] GetEvents()
{
const BindingFlags DefaultBindingFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance;
Expand Down Expand Up @@ -1615,7 +1617,7 @@ public FieldBuilder DefineUninitializedData(string name, int size, FieldAttribut
public override int MetadataToken => 0x02000000 | table_idx;

[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2074:UnrecognizedReflectionPattern",
Justification = "Linker doesn't recongnize ResolveUserType")]
Justification = "Linker doesn't analyze ResolveUserType but it's an identity function")]
public void SetParent([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent)
{
check_not_created();
Expand Down