diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/MemoryHelpers.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/MemoryHelpers.cs deleted file mode 100644 index 644fcf1a59940e..00000000000000 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/MemoryHelpers.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.Runtime; - -namespace Internal.Runtime.CompilerHelpers -{ - /// - /// These methods are used to implement memcpy and memset intrinsics with null checks. - /// - internal static class MemoryHelpers - { - private static unsafe void MemSet(ref byte dest, byte value, nuint size) - { - if (size > 0) - { - _ = dest; - SpanHelpers.Fill(ref dest, size, value); - } - } - - private static unsafe void MemCopy(ref byte dest, ref byte src, nuint size) - { - if (size > 0) - { - _ = dest; - _ = src; - Buffer.Memmove(ref dest, ref src, size); - } - } - } -} diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj b/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj index d6e8c3a7e90274..4ca91458c70e71 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj @@ -100,7 +100,6 @@ - diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs index c55dc58175b05f..9e7285b751a3d3 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs @@ -134,10 +134,10 @@ public static void GetEntryPoint(TypeSystemContext context, ReadyToRunHelper id, break; case ReadyToRunHelper.MemCpy: - methodDesc = context.GetHelperEntryPoint("MemoryHelpers", "MemCopy"); + mangledName = "memcpy"; // TODO: Null reference handling break; case ReadyToRunHelper.MemSet: - methodDesc = context.GetHelperEntryPoint("MemoryHelpers", "MemSet"); + mangledName = "memset"; // TODO: Null reference handling break; case ReadyToRunHelper.GetRuntimeTypeHandle: