-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend RunClassConstructor intrinsic handling to accept NonPublicCons…
…tructors (#103947) This should not generate a warning since the static constructor will be kept.
- Loading branch information
1 parent
d6581f8
commit eb29166
Showing
5 changed files
with
73 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...src/ILLink.Shared/TrimAnalysis/RuntimeTypeHandleForValueWithDynamicallyAccessedMembers.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) .NET Foundation and contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System.Diagnostics; | ||
using ILLink.Shared.DataFlow; | ||
using ILLink.Shared.TypeSystemProxy; | ||
|
||
// This is needed due to NativeAOT which doesn't enable nullable globally yet | ||
#nullable enable | ||
|
||
namespace ILLink.Shared.TrimAnalysis | ||
{ | ||
/// <summary> | ||
/// This represents a type handle obtained from a Type with DynamicallyAccessedMembers annotations. | ||
/// </summary> | ||
internal sealed record RuntimeTypeHandleForValueWithDynamicallyAccessedMembers : SingleValue | ||
{ | ||
public RuntimeTypeHandleForValueWithDynamicallyAccessedMembers (in ValueWithDynamicallyAccessedMembers underlyingTypeValue) | ||
{ | ||
UnderlyingTypeValue = underlyingTypeValue; | ||
} | ||
|
||
public readonly ValueWithDynamicallyAccessedMembers UnderlyingTypeValue; | ||
|
||
public override SingleValue DeepCopy () => this; // This value is immutable | ||
|
||
public override string ToString () => this.ValueToString (UnderlyingTypeValue); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters