提交 9257fff0 编写于 作者: J Jan Kotas 提交者: GitHub

Cleanup (dotnet/coreclr#27502)

* Delete empty FireCustomerDebugProbe FCall

* Delete duplicate C++ compiler command line options


Commit migrated from https://github.com/dotnet/coreclr/commit/8460516ceb23458f7a279bb73aa6176e17e8a90d
上级 c37c2392
......@@ -454,7 +454,7 @@ if (CLR_CMAKE_PLATFORM_UNIX)
add_compile_options(-fno-omit-frame-pointer)
# The -fms-extensions enable the stuff like __if_exists, __declspec(uuid()), etc.
add_compile_options(-fms-extensions )
add_compile_options(-fms-extensions)
#-fms-compatibility Enable full Microsoft Visual C++ compatibility
#-fms-extensions Accept some non-standard constructs supported by the Microsoft compiler
......@@ -511,9 +511,7 @@ if (CLR_CMAKE_PLATFORM_UNIX)
# may not generate the same object layout as MSVC.
add_compile_options(-Wno-incompatible-ms-struct)
else()
add_compile_options(-Wno-unused-variable)
add_compile_options(-Wno-unused-but-set-variable)
add_compile_options(-fms-extensions)
add_compile_options(-Wno-unknown-pragmas)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
add_compile_options(-Wno-nonnull-compare)
......
......@@ -257,7 +257,6 @@
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\TypeDependencyAttribute.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\GCSettings.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ComTypes\IEnumerable.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\CriticalHandle.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\Expando\IExpando.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\GCHandle.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\Marshal.CoreCLR.cs" />
......
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
namespace System.Runtime.InteropServices
{
public abstract partial class CriticalHandle : CriticalFinalizerObject, IDisposable
{
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void ReleaseHandleFailed();
}
}
......@@ -186,10 +186,6 @@ FCFuncStart(gExceptionFuncs)
FCFuncElement("GetExceptionCount", ExceptionNative::GetExceptionCount)
FCFuncEnd()
FCFuncStart(gCriticalHandleFuncs)
FCFuncElement("ReleaseHandleFailed", CriticalHandle::FireCustomerDebugProbe)
FCFuncEnd()
FCFuncStart(gTypedReferenceFuncs)
FCFuncElement("InternalToObject", ReflectionInvocation::TypedReferenceToObject)
FCFuncElement("InternalMakeTypedReference", ReflectionInvocation::MakeTypedReference)
......@@ -1217,7 +1213,6 @@ FCClassElement("AssemblyName", "System.Reflection", gAssemblyNameFuncs)
FCClassElement("Buffer", "System", gBufferFuncs)
FCClassElement("CLRConfig", "System", gClrConfig)
FCClassElement("CompatibilitySwitch", "System.Runtime.Versioning", gCompatibilitySwitchFuncs)
FCClassElement("CriticalHandle", "System.Runtime.InteropServices", gCriticalHandleFuncs)
FCClassElement("CustomAttribute", "System.Reflection", gCOMCustomAttributeFuncs)
FCClassElement("CustomAttributeEncodedArgument", "System.Reflection", gCustomAttributeEncodedArgument)
FCClassElement("DateTime", "System", gDateTimeFuncs)
......
......@@ -2128,8 +2128,6 @@ class CriticalHandle : public Object
static size_t GetHandleOffset() { LIMITED_METHOD_CONTRACT; return offsetof(CriticalHandle, m_handle); }
void SetHandle(LPVOID handle) { LIMITED_METHOD_CONTRACT; m_handle = handle; }
static FCDECL1(void, FireCustomerDebugProbe, CriticalHandle* refThisUNSAFE);
};
......
......@@ -219,17 +219,3 @@ void SafeHandle::RunReleaseMethod(SafeHandle* psh)
GCPROTECT_END();
}
FCIMPL1(void, CriticalHandle::FireCustomerDebugProbe, CriticalHandle* refThisUNSAFE)
{
FCALL_CONTRACT;
CRITICALHANDLEREF ch(refThisUNSAFE);
HELPER_METHOD_FRAME_BEGIN_1(ch);
FCUnique(0x53);
HELPER_METHOD_FRAME_END();
}
FCIMPLEND
......@@ -149,8 +149,7 @@ private void Cleanup()
// occur implicitly as part of unmarshaling another P/Invoke).
int lastError = Marshal.GetLastWin32Error();
if (!ReleaseHandle())
ReleaseHandleFailed();
ReleaseHandle();
Marshal.SetLastWin32Error(lastError);
GC.SuppressFinalize(this);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册