From 8c74b3bcd691d842a891bc55909a18a8b1e53200 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 23 Oct 2017 08:31:27 -0700 Subject: Search/replace _DEBUG => DEBUG --- src/mscorlib/System.Private.CoreLib.csproj | 2 +- src/mscorlib/shared/System/Convert.cs | 2 +- src/mscorlib/shared/System/Text/StringBuilder.cs | 2 +- src/mscorlib/src/Microsoft/Win32/OAVariantLib.cs | 2 -- src/mscorlib/src/System/BCLDebug.cs | 3 --- src/mscorlib/src/System/Reflection/CustomAttribute.cs | 2 +- src/mscorlib/src/System/RtType.cs | 2 +- src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs | 8 ++++---- src/mscorlib/src/System/Runtime/MemoryFailPoint.cs | 6 +++--- src/mscorlib/src/System/StubHelpers.cs | 4 ++-- src/mscorlib/src/System/Threading/WaitHandle.cs | 4 ++-- 11 files changed, 16 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj index 25f605ce63..5e8b28f6d8 100644 --- a/src/mscorlib/System.Private.CoreLib.csproj +++ b/src/mscorlib/System.Private.CoreLib.csproj @@ -74,7 +74,7 @@ false true full - DBG;_DEBUG;_LOGGING;DEBUG;TRACE;$(DefineConstants) + _LOGGING;DEBUG;TRACE;$(DefineConstants) CODE_ANALYSIS;$(DefineConstants) diff --git a/src/mscorlib/shared/System/Convert.cs b/src/mscorlib/shared/System/Convert.cs index 459127740b..6c592a4923 100644 --- a/src/mscorlib/shared/System/Convert.cs +++ b/src/mscorlib/shared/System/Convert.cs @@ -134,7 +134,7 @@ namespace System private const Int32 base64LineBreakPosition = 76; -#if _DEBUG +#if DEBUG private static bool TriggerAsserts = DoAsserts(); private static bool DoAsserts() { diff --git a/src/mscorlib/shared/System/Text/StringBuilder.cs b/src/mscorlib/shared/System/Text/StringBuilder.cs index f5003d8124..e5a894dfed 100644 --- a/src/mscorlib/shared/System/Text/StringBuilder.cs +++ b/src/mscorlib/shared/System/Text/StringBuilder.cs @@ -270,7 +270,7 @@ namespace System.Text info.AddValue(ThreadIDField, 0); } - [System.Diagnostics.Conditional("_DEBUG")] + [System.Diagnostics.Conditional("DEBUG")] private void AssertInvariants() { Debug.Assert(m_ChunkOffset + m_ChunkChars.Length >= m_ChunkOffset, "The length of the string is greater than int.MaxValue."); diff --git a/src/mscorlib/src/Microsoft/Win32/OAVariantLib.cs b/src/mscorlib/src/Microsoft/Win32/OAVariantLib.cs index 120a74f8c1..053507b2d4 100644 --- a/src/mscorlib/src/Microsoft/Win32/OAVariantLib.cs +++ b/src/mscorlib/src/Microsoft/Win32/OAVariantLib.cs @@ -100,9 +100,7 @@ namespace Microsoft.Win32 private static int GetCVTypeFromClass(Type ctype) { Debug.Assert(ctype != null); -#if _DEBUG Debug.Assert(ClassTypes[CV_OBJECT] == typeof(Object), "OAVariantLib::ClassTypes[CV_OBJECT] == Object.class"); -#endif int cvtype = -1; for (int i = 0; i < ClassTypes.Length; i++) diff --git a/src/mscorlib/src/System/BCLDebug.cs b/src/mscorlib/src/System/BCLDebug.cs index a3d108d709..e9435aff2f 100644 --- a/src/mscorlib/src/System/BCLDebug.cs +++ b/src/mscorlib/src/System/BCLDebug.cs @@ -48,9 +48,6 @@ namespace System { internal static volatile bool m_registryChecked = false; internal static volatile bool m_loggingNotEnabled = false; -#if _DEBUG - internal static volatile bool m_domainUnloadAdded; -#endif private static readonly SwitchStructure[] switches = { new SwitchStructure("NLS", 0x00000001), diff --git a/src/mscorlib/src/System/Reflection/CustomAttribute.cs b/src/mscorlib/src/System/Reflection/CustomAttribute.cs index 7f50286996..f394b0100f 100644 --- a/src/mscorlib/src/System/Reflection/CustomAttribute.cs +++ b/src/mscorlib/src/System/Reflection/CustomAttribute.cs @@ -1912,7 +1912,7 @@ namespace System.Reflection s_pca = temp_pca; } - [Conditional("_DEBUG")] + [Conditional("DEBUG")] private static void VerifyPseudoCustomAttribute(RuntimeType pca) { // If any of these are invariants are no longer true will have to diff --git a/src/mscorlib/src/System/RtType.cs b/src/mscorlib/src/System/RtType.cs index c8c4e0abf3..141cb166e8 100644 --- a/src/mscorlib/src/System/RtType.cs +++ b/src/mscorlib/src/System/RtType.cs @@ -46,7 +46,7 @@ namespace System FormatAssembly = 0x00000004, // Include assembly display name in type names FormatSignature = 0x00000008, // Include signature in method names FormatNoVersion = 0x00000010, // Suppress version and culture information in all assembly names -#if _DEBUG +#if DEBUG FormatDebug = 0x00000020, // For debug printing of types only #endif FormatAngleBrackets = 0x00000040, // Whether generic types are C or C[T] diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs b/src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs index ef217d153f..f89f201c79 100644 --- a/src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs +++ b/src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs @@ -93,7 +93,7 @@ namespace System.Runtime.CompilerServices return new StackCrawlMarkHandle(UnsafeCastToStackPointer(ref stackMark)); } -#if _DEBUG +#if DEBUG static internal int UnsafeEnumCast(T val) where T : struct // Actually T must be 4 byte (or less) enum { Debug.Assert(typeof(T).IsEnum @@ -145,7 +145,7 @@ namespace System.Runtime.CompilerServices // See getILIntrinsicImplementation for how this happens. throw new InvalidOperationException(); } -#else // _DEBUG +#else // DEBUG static internal int UnsafeEnumCast(T val) where T : struct // Actually T must be 4 byte (or less) enum { @@ -167,7 +167,7 @@ namespace System.Runtime.CompilerServices // See getILIntrinsicImplementation for how this happens. throw new InvalidOperationException(); } -#endif // _DEBUG +#endif // DEBUG // Set the given element in the array without any type or range checks [MethodImplAttribute(MethodImplOptions.InternalCall)] @@ -179,7 +179,7 @@ namespace System.Runtime.CompilerServices return Unsafe.As(o); } -#if _DEBUG +#if DEBUG [MethodImplAttribute(MethodImplOptions.InternalCall)] private extern static bool IsAddressInStack(IntPtr ptr); #endif diff --git a/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs b/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs index e7bf0c58f0..660b0f30be 100644 --- a/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs +++ b/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs @@ -261,7 +261,7 @@ namespace System.Runtime if (needPageFile || needAddressSpace) { InsufficientMemoryException e = new InsufficientMemoryException(SR.InsufficientMemory_MemFailPoint); -#if _DEBUG +#if DEBUG e.Data["MemFailPointState"] = new MemoryFailPointState(sizeInMegabytes, segmentSize, needPageFile, needAddressSpace, needContiguousVASpace, availPageFile >> 20, totalAddressSpaceFree >> 20, @@ -273,7 +273,7 @@ namespace System.Runtime if (needContiguousVASpace) { InsufficientMemoryException e = new InsufficientMemoryException(SR.InsufficientMemory_MemFailPoint_VAFrag); -#if _DEBUG +#if DEBUG e.Data["MemFailPointState"] = new MemoryFailPointState(sizeInMegabytes, segmentSize, needPageFile, needAddressSpace, needContiguousVASpace, availPageFile >> 20, totalAddressSpaceFree >> 20, @@ -422,7 +422,7 @@ namespace System.Runtime */ } -#if _DEBUG +#if DEBUG [Serializable] internal sealed class MemoryFailPointState { diff --git a/src/mscorlib/src/System/StubHelpers.cs b/src/mscorlib/src/System/StubHelpers.cs index d9a7e1277e..8bdcb76330 100644 --- a/src/mscorlib/src/System/StubHelpers.cs +++ b/src/mscorlib/src/System/StubHelpers.cs @@ -254,10 +254,10 @@ namespace System.StubHelpers { // If caller provided a buffer, construct the BSTR manually. The size // of the buffer must be at least (lengthInBytes + 6) bytes. -#if _DEBUG +#if DEBUG uint length = *((uint*)pNativeBuffer.ToPointer()); Debug.Assert(length >= lengthInBytes + 6, "BSTR localloc'ed buffer is too small"); -#endif // _DEBUG +#endif // set length *((uint*)pNativeBuffer.ToPointer()) = lengthInBytes; diff --git a/src/mscorlib/src/System/Threading/WaitHandle.cs b/src/mscorlib/src/System/Threading/WaitHandle.cs index 125a29ed6c..69c34456cb 100644 --- a/src/mscorlib/src/System/Threading/WaitHandle.cs +++ b/src/mscorlib/src/System/Threading/WaitHandle.cs @@ -273,7 +273,7 @@ namespace System.Threading internalWaitHandles[i] = waitHandle; } -#if _DEBUG +#if DEBUG // make sure we do not use waitHandles any more. waitHandles = null; #endif @@ -362,7 +362,7 @@ namespace System.Threading internalWaitHandles[i] = waitHandle; } -#if _DEBUG +#if DEBUG // make sure we do not use waitHandles any more. waitHandles = null; #endif -- cgit v1.2.3