diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs index 77d5987771ef8..46ec240cba14e 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs @@ -10,8 +10,6 @@ namespace Internal.IL { - using Workarounds; - public sealed class ReadyToRunILProvider : ILProvider { private MethodIL TryGetIntrinsicMethodILForActivator(MethodDesc method) @@ -99,7 +97,7 @@ public override MethodIL GetMethodIL(MethodDesc method) { if (method is EcmaMethod ecmaMethod) { - if (method.IsIntrinsicWorkaround()) + if (method.IsIntrinsic) { MethodIL result = TryGetIntrinsicMethodIL(method); if (result != null) @@ -115,7 +113,7 @@ public override MethodIL GetMethodIL(MethodDesc method) else if (method is MethodForInstantiatedType || method is InstantiatedMethod) { // Intrinsics specialized per instantiation - if (method.IsIntrinsicWorkaround()) + if (method.IsIntrinsic) { MethodIL methodIL = TryGetPerInstantiationIntrinsicMethodIL(method); if (methodIL != null) @@ -134,16 +132,3 @@ public override MethodIL GetMethodIL(MethodDesc method) } } } - -namespace Internal.IL.Workarounds -{ - static class IntrinsicExtensions - { - // We should ideally mark interesting methods a [Intrinsic] to avoid having to - // name match everything in CoreLib. - public static bool IsIntrinsicWorkaround(this MethodDesc method) - { - return method.OwningType is MetadataType mdType && mdType.Module == method.Context.SystemModule; - } - } -}