diff options
author | Andrew Au <andrewau@microsoft.com> | 2018-09-08 02:52:42 +0300 |
---|---|---|
committer | Andrew Au <andrewau@microsoft.com> | 2018-09-08 02:52:42 +0300 |
commit | 878be8e120fba51f1a1f4d49b83aff6a1c4e0c79 (patch) | |
tree | 3f4780df42e1064d68a6c6508d254c3ae52e3fb5 | |
parent | 8355e3520747132db426db6699149d0cb3b7cddd (diff) |
ToPointerFix - VS debugger needs the ToPointer() methods to inspect a pointer, marking it as DependencyReductionRoot to make sure it is not optimized away.
[tfs-changeset: 1713493]
-rw-r--r-- | src/System.Private.CoreLib/shared/System/IntPtr.cs | 3 | ||||
-rw-r--r-- | src/System.Private.CoreLib/shared/System/UIntPtr.cs | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/IntPtr.cs b/src/System.Private.CoreLib/shared/System/IntPtr.cs index f79334a96..d23742fa7 100644 --- a/src/System.Private.CoreLib/shared/System/IntPtr.cs +++ b/src/System.Private.CoreLib/shared/System/IntPtr.cs @@ -217,6 +217,9 @@ namespace System [CLSCompliant(false)] [Intrinsic] [NonVersionable] +#if PROJECTN + [System.Runtime.CompilerServices.DependencyReductionRootAttribute] +#endif public unsafe void* ToPointer() { return _value; diff --git a/src/System.Private.CoreLib/shared/System/UIntPtr.cs b/src/System.Private.CoreLib/shared/System/UIntPtr.cs index 9534f4f87..c57dd86a7 100644 --- a/src/System.Private.CoreLib/shared/System/UIntPtr.cs +++ b/src/System.Private.CoreLib/shared/System/UIntPtr.cs @@ -208,6 +208,9 @@ namespace System [Intrinsic] [NonVersionable] +#if PROJECTN + [System.Runtime.CompilerServices.DependencyReductionRootAttribute] +#endif public unsafe void* ToPointer() { return _value; |