<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\RuntimeFeature.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\RuntimeHelpers.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\RuntimeWrappedException.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\SkipLocalsInitAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\SpecialNameAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\StateMachineAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\StringFreezingAttribute.cs" />
--- /dev/null
+// 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.
+
+namespace System.Runtime.CompilerServices
+{
+ /// <summary>
+ /// Used to indicate to the compiler that the <c>.locals init</c> flag should
+ /// not be set in nested method headers when emitting to metadata.
+ /// </summary>
+ /// <remarks>
+ /// This attribute is unsafe because it may reveal uninitialized memory to
+ /// the application in certain instances (e.g., reading from uninitialized
+ /// stackalloc'd memory). If applied to a method directly, the attribute
+ /// applies to that method and all nested functions (lambdas, local
+ /// functions) below it. If applied to a type or module, it applies to all
+ /// methods nested inside. This attribute is intentionally not permitted on
+ /// assemblies. Use at the module level instead to apply to multiple type
+ /// declarations.
+ /// </remarks>
+ [AttributeUsage(AttributeTargets.Module
+ | AttributeTargets.Class
+ | AttributeTargets.Struct
+ | AttributeTargets.Constructor
+ | AttributeTargets.Method
+ | AttributeTargets.Property
+ | AttributeTargets.Event, Inherited = false)]
+ public sealed class SkipLocalsInitAttribute : Attribute
+ {
+ public SkipLocalsInitAttribute()
+ {
+ }
+ }
+}
\ No newline at end of file
public object WrappedException { get { throw null; } }
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
}
+ [System.AttributeUsageAttribute(System.AttributeTargets.Module | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Event, Inherited = false)]
+ public sealed partial class SkipLocalsInitAttribute : System.Attribute
+ {
+ public SkipLocalsInitAttribute() { }
+ }
[System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Struct)]
public sealed partial class SpecialNameAttribute : System.Attribute
{