summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2018-12-21 20:15:08 +0100
committerJan Kotas <jkotas@microsoft.com>2018-12-21 11:15:08 -0800
commitcc68e4af8388c7b85984d1fc769e90ddba14f3e5 (patch)
treef9f549af8a026bacc132811c4e5c85f078da308b /src
parent82e02f37564f83c3a7c90e5e28a652a39017701a (diff)
downloadcoreclr-cc68e4af8388c7b85984d1fc769e90ddba14f3e5.tar.gz
coreclr-cc68e4af8388c7b85984d1fc769e90ddba14f3e5.tar.bz2
coreclr-cc68e4af8388c7b85984d1fc769e90ddba14f3e5.zip
Moves ByReference to shared CoreLib (#21633)
Diffstat (limited to 'src')
-rw-r--r--src/System.Private.CoreLib/System.Private.CoreLib.csproj1
-rw-r--r--src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems1
-rw-r--r--src/System.Private.CoreLib/shared/System/ByReference.cs (renamed from src/System.Private.CoreLib/src/System/ByReference.cs)11
3 files changed, 9 insertions, 4 deletions
diff --git a/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/System.Private.CoreLib.csproj
index 17fa5d72b8..f471ad6ac0 100644
--- a/src/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -130,7 +130,6 @@
<Compile Include="$(BclSourcesRoot)\System\Attribute.cs" />
<Compile Include="$(BclSourcesRoot)\System\BadImageFormatException.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Buffer.cs" />
- <Compile Include="$(BclSourcesRoot)\System\ByReference.cs" />
<Compile Include="$(BclSourcesRoot)\System\CLRConfig.cs" />
<Compile Include="$(BclSourcesRoot)\System\Collections\EmptyReadOnlyDictionaryInternal.cs" />
<Compile Include="$(BclSourcesRoot)\System\Collections\Generic\ArraySortHelper.CoreCLR.cs" />
diff --git a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
index 0c40e26e9c..27d43b76f8 100644
--- a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
+++ b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
@@ -111,6 +111,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Buffers\Text\Utf8Parser\Utf8Parser.TimeSpan.LittleG.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Buffers\Text\Utf8Parser\Utf8Parser.TimeSpanSplitter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Byte.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\ByReference.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Char.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\CharEnumerator.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\CLSCompliantAttribute.cs" />
diff --git a/src/System.Private.CoreLib/src/System/ByReference.cs b/src/System.Private.CoreLib/shared/System/ByReference.cs
index 298b4bb07e..492979a2d7 100644
--- a/src/System.Private.CoreLib/src/System/ByReference.cs
+++ b/src/System.Private.CoreLib/shared/System/ByReference.cs
@@ -13,24 +13,29 @@ namespace System
[NonVersionable]
internal readonly ref struct ByReference<T>
{
- private readonly IntPtr _value;
+ // CS0169: The private field '{blah}' is never used
+#pragma warning disable 169
+ private readonly IntPtr _value;
+#pragma warning restore
+ [Intrinsic]
public ByReference(ref T value)
{
// Implemented as a JIT intrinsic - This default implementation is for
// completeness and to provide a concrete error if called via reflection
// or if intrinsic is missed.
- throw new System.PlatformNotSupportedException();
+ throw new PlatformNotSupportedException();
}
public ref T Value
{
+ [Intrinsic]
get
{
// Implemented as a JIT intrinsic - This default implementation is for
// completeness and to provide a concrete error if called via reflection
// or if the intrinsic is missed.
- throw new System.PlatformNotSupportedException();
+ throw new PlatformNotSupportedException();
}
}
}