diff --git a/src/libraries/illink-sharedframework.targets b/src/libraries/illink-sharedframework.targets index 5b1df7c13de168..5daa06860fa73b 100644 --- a/src/libraries/illink-sharedframework.targets +++ b/src/libraries/illink-sharedframework.targets @@ -72,7 +72,6 @@ <_SuppressionsXmls Include="$(CoreLibSharedILLinkSuppressionsFilesPrefix).xml" /> <_SuppressionsXmls Condition="'$(TargetOS)' != 'windows'" Include="$(CoreLibSharedILLinkSuppressionsFilesPrefix).NonWindows.xml" /> - <_SuppressionsXmls Condition="'$(RuntimeFlavor)' == 'Mono'" Include="$(MonoProjectRoot)netcore\System.Private.CoreLib\$(ProjectILLinkSuppressionsFile).xml" /> diff --git a/src/mono/netcore/System.Private.CoreLib/src/ILLink/ILLink.Suppressions.xml b/src/mono/netcore/System.Private.CoreLib/src/ILLink/ILLink.Suppressions.xml deleted file mode 100644 index ea4c3cc3a9eec1..00000000000000 --- a/src/mono/netcore/System.Private.CoreLib/src/ILLink/ILLink.Suppressions.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - ILLink - IL2060 - member - M:System.Reflection.Emit.MethodOnTypeBuilderInst.RuntimeResolve - - - ILLink - IL2074 - member - M:System.Reflection.Emit.TypeBuilder.ResolveUserTypes - - - \ No newline at end of file diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/MethodOnTypeBuilderInst.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/MethodOnTypeBuilderInst.cs index 50c9711ec306cf..98c09481bfbdc3 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/MethodOnTypeBuilderInst.cs +++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/MethodOnTypeBuilderInst.cs @@ -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(); diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs index b1d1c061930850..3febd6041e523c 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs +++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs @@ -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); @@ -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; @@ -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();