Stop checking for [SkipLocalsInit] being available
このコミットが含まれているのは:
1 親
4f99120646
コミット
0804b66ca2
2ファイル変更
+23
-33
検索条件に一致するファイルはありません
@@ -60,12 +60,12 @@ partial class IShaderGenerator
|
||||
/// </summary>
|
||||
/// <param name="hierarchyInfo">The <see cref="HierarchyInfo"/> instance for the current type.</param>
|
||||
/// <param name="methodDeclaration">The <see cref="MethodDeclarationSyntax"/> item to insert.</param>
|
||||
/// <param name="canUseSkipLocalsInit">Whether <c>[SkipLocalsInit]</c> can be used.</param>
|
||||
/// <param name="addSkipLocalsInitAttribute">Whether <c>[SkipLocalsInit]</c> should be used.</param>
|
||||
/// <returns>A <see cref="CompilationUnitSyntax"/> object wrapping <paramref name="methodDeclaration"/>.</returns>
|
||||
private static CompilationUnitSyntax GetCompilationUnitFromMethod(
|
||||
HierarchyInfo hierarchyInfo,
|
||||
MethodDeclarationSyntax methodDeclaration,
|
||||
bool canUseSkipLocalsInit)
|
||||
bool addSkipLocalsInitAttribute)
|
||||
{
|
||||
// Method attributes
|
||||
List<AttributeListSyntax> attributes = new()
|
||||
@@ -86,8 +86,8 @@ partial class IShaderGenerator
|
||||
Literal("This method is not intended to be used directly by user code"))))))
|
||||
};
|
||||
|
||||
// Add [SkipLocalsInit] if the target project allows it
|
||||
if (canUseSkipLocalsInit)
|
||||
// Add [SkipLocalsInit] if needed
|
||||
if (addSkipLocalsInitAttribute)
|
||||
{
|
||||
attributes.Add(AttributeList(SingletonSeparatedList(Attribute(IdentifierName("global::System.Runtime.CompilerServices.SkipLocalsInit")))));
|
||||
}
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする