Skip to content

Commit

Permalink
[main] Update dependencies from dotnet/arcade (dotnet/linker#3177)
Browse files Browse the repository at this point in the history
[main] Update dependencies from dotnet/arcade


 - Analyzer fix

 - Update to net8

 - Update import order

 - Add net8 handling

 - Analyzer fixes

 - Merge branch 'main' into darc-main-328ee272-9fb8-4717-bae0-5575b14d7744

 - More analyzer fixes

 - Port fix from runtime

 - Update failing test

 - verbose test

 - Fix formatting

 - Fix the task to look for net8.0 location.
Revert test changes.

 - Workaround a possible issue in the new SDK

Commit migrated from dotnet/linker@2bd23e1
  • Loading branch information
dotnet-maestro[bot] authored Jan 23, 2023
1 parent 1b8d340 commit d78e9ef
Show file tree
Hide file tree
Showing 53 changed files with 165 additions and 119 deletions.
10 changes: 5 additions & 5 deletions src/tools/illink/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="eng/Analyzers.props" />

<PropertyGroup>
<!-- Don't produce ref assemblies by default. -->
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<IsReferenceAssembly Condition="'$(IsReferenceAssembly)' == '' and '$([System.IO.Path]::GetFileName($(MSBuildProjectDirectory)))' == 'ref'">true</IsReferenceAssembly>
<DisableImplicitNamespaceImports_DotNet>true</DisableImplicitNamespaceImports_DotNet>
<!-- The TFM for the product (linker, task,.. not analyzer, which is netstandard) -->
<NetCoreAppToolCurrent>net7.0</NetCoreAppToolCurrent>
<NetCoreAppToolCurrent>$(NetCurrent)</NetCoreAppToolCurrent>
<!-- The TFM for all the tests - intentionally different since tests may depend on new framework APIs in order to validate
linker interaction with them, linker itself doesn't need the new framework typically. -->
<NetCoreAppTestsCurrent>net7.0</NetCoreAppTestsCurrent>
<NetCoreAppTestsCurrent>$(NetCurrent)</NetCoreAppTestsCurrent>
</PropertyGroup>
<PropertyGroup Condition=" '$(IsReferenceAssembly)' == 'true' ">
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
Expand All @@ -18,9 +21,6 @@
<PublishWindowsPdb>false</PublishWindowsPdb>
<RunApiCompat>false</RunApiCompat>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="eng/Analyzers.props" />
<PropertyGroup>
<IsPackable>false</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
1 change: 1 addition & 0 deletions src/tools/illink/NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources />
Expand Down
8 changes: 4 additions & 4 deletions src/tools/illink/eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.22630.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23067.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>e82404fca08383513e0b0b3c5308d4a9b18b7c7a</Sha>
<Sha>3600aa80a01e90f38a7b86b9d7c1264e091aa5a8</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="8.0.0-beta.22630.1">
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="8.0.0-beta.23067.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>e82404fca08383513e0b0b3c5308d4a9b18b7c7a</Sha>
<Sha>3600aa80a01e90f38a7b86b9d7c1264e091aa5a8</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk.IL" Version="7.0.0-rtm.22507.1">
<Uri>https://github.com/dotnet/runtime</Uri>
Expand Down
4 changes: 2 additions & 2 deletions src/tools/illink/eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
<SystemReflectionMetadataVersion>5.0.0</SystemReflectionMetadataVersion>
<MicrosoftBuildFrameworkVersion>17.0.0-preview-21267-01</MicrosoftBuildFrameworkVersion>
<MicrosoftBuildUtilitiesCoreVersion>17.0.0-preview-21267-01</MicrosoftBuildUtilitiesCoreVersion>
<MicrosoftDotNetApiCompatVersion>8.0.0-beta.22630.1</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetApiCompatVersion>8.0.0-beta.23067.5</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.21271.1</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftCodeAnalysisCSharpCodeStyleVersion>3.10.0-2.final</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
<MicrosoftCodeAnalysisVersion>4.5.0-1.22517.9</MicrosoftCodeAnalysisVersion>
<MicrosoftNetCompilersToolsetVersion>$(MicrosoftCodeAnalysisVersion)</MicrosoftNetCompilersToolsetVersion>
<MicrosoftCodeAnalysisCSharpAnalyzerTestingXunitVersion>1.0.1-beta1.*</MicrosoftCodeAnalysisCSharpAnalyzerTestingXunitVersion>
<MicrosoftCodeAnalysisBannedApiAnalyzersVersion>3.3.2</MicrosoftCodeAnalysisBannedApiAnalyzersVersion>
<MicrosoftILVerificationVersion>7.0.0-preview.7.22375.6</MicrosoftILVerificationVersion>
<MicrosoftILVerificationVersion>8.0.0-alpha.1.23067.11</MicrosoftILVerificationVersion>
<!-- This controls the version of the cecil package, or the version of cecil in the project graph
when we build the cecil submodule. The reference assembly package will depend on this version of cecil.
Keep this in sync with ProjectInfo.cs in the submodule. -->
Expand Down
18 changes: 11 additions & 7 deletions src/tools/illink/eng/common/cross/build-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ __UbuntuPackages+=" symlinks"
__UbuntuPackages+=" libicu-dev"
__UbuntuPackages+=" liblttng-ust-dev"
__UbuntuPackages+=" libunwind8-dev"
__UbuntuPackages+=" libnuma-dev"

__AlpinePackages+=" gettext-dev"
__AlpinePackages+=" icu-dev"
__AlpinePackages+=" libunwind-dev"
__AlpinePackages+=" lttng-ust-dev"
__AlpinePackages+=" compiler-rt-static"
__AlpinePackages+=" numactl-dev"

# runtime libraries' dependencies
__UbuntuPackages+=" libcurl4-openssl-dev"
Expand Down Expand Up @@ -147,17 +149,17 @@ while :; do
__BuildArch=ppc64le
__UbuntuArch=ppc64el
__UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libunwind8-dev//')
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp-dev//')
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp5//')
__UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
__UbuntuPackages="${__UbuntuPackages// libomp-dev/}"
__UbuntuPackages="${__UbuntuPackages// libomp5/}"
unset __LLDB_Package
;;
riscv64)
__BuildArch=riscv64
__UbuntuArch=riscv64
__UbuntuRepo="http://deb.debian.org/debian-ports"
__CodeName=sid
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libunwind8-dev//')
__UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
unset __LLDB_Package

if [[ -e "/usr/share/keyrings/debian-ports-archive-keyring.gpg" ]]; then
Expand All @@ -168,9 +170,9 @@ while :; do
__BuildArch=s390x
__UbuntuArch=s390x
__UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libunwind8-dev//')
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp-dev//')
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp5//')
__UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
__UbuntuPackages="${__UbuntuPackages// libomp-dev/}"
__UbuntuPackages="${__UbuntuPackages// libomp5/}"
unset __LLDB_Package
;;
x64)
Expand Down Expand Up @@ -310,6 +312,8 @@ done

if [[ "$__BuildArch" == "armel" ]]; then
__LLDB_Package="lldb-3.5-dev"
elif [[ "$__BuildArch" == "arm" && "$__AlpineVersion" == "3.13" ]]; then
__AlpinePackages="${__AlpinePackages//numactl-dev/}"
fi

__UbuntuPackages+=" ${__LLDB_Package:-}"
Expand Down
45 changes: 43 additions & 2 deletions src/tools/illink/eng/common/generate-locproject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ $jsonTemplateFiles | ForEach-Object {
$jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern

$wxlFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\.+\.wxl" -And -Not( $_.Directory.Name -Match "\d{4}" ) } # localized files live in four digit lang ID directories; this excludes them
if (-not $wxlFiles) {
$wxlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\1033\\.+\.wxl" } # pick up en files (1033 = en) specifically so we can copy them to use as the neutral xlf files
if ($wxlEnFiles) {
$wxlFiles = @()
$wxlEnFiles | ForEach-Object {
$destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)"
$wxlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
}
}
}

$macosHtmlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\.lproj\\.+\.html" } # add installer HTML files
$macosHtmlFiles = @()
if ($macosHtmlEnFiles) {
$macosHtmlEnFiles | ForEach-Object {
$destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)"
$macosHtmlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
}
}

$xlfFiles = @()

Expand Down Expand Up @@ -99,8 +118,7 @@ $locJson = @{
$outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\"
$continue = $true
foreach ($exclusion in $exclusions.Exclusions) {
if ($_.FullName.Contains($exclusion))
{
if ($_.FullName.Contains($exclusion)) {
$continue = $false
}
}
Expand All @@ -115,6 +133,29 @@ $locJson = @{
}
}
)
},
@{
LanguageSet = $LanguageSet
CloneLanguageSet = "VS_macOS_CloneLanguages"
LocItems = @(
$macosHtmlFiles | ForEach-Object {
$outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\"
$continue = $true
foreach ($exclusion in $exclusions.Exclusions) {
if ($_.FullName.Contains($exclusion)) {
$continue = $false
}
}
$sourceFile = ($_.FullName | Resolve-Path -Relative)
if ($continue) {
return @{
SourceFile = $sourceFile
CopyOption = "LangIDOnPath"
OutputPath = $outputPath
}
}
}
)
}
)
}
Expand Down
10 changes: 10 additions & 0 deletions src/tools/illink/eng/common/templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ jobs:
- ${{ if ne(variable.group, '') }}:
- group: ${{ variable.group }}

# handle template variable syntax
# example:
# - template: path/to/template.yml
# parameters:
# [key]: [value]
- ${{ if ne(variable.template, '') }}:
- template: ${{ variable.template }}
${{ if ne(variable.parameters, '') }}:
parameters: ${{ variable.parameters }}

# handle key-value variable syntax.
# example:
# - [key]: [value]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
runAsPublic: false
sourceIndexPackageVersion: 1.0.1-20220804.1
sourceIndexPackageVersion: 1.0.1-20221220.2
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
preSteps: []
Expand Down Expand Up @@ -40,10 +40,10 @@ jobs:
- ${{ preStep }}

- task: UseDotNet@2
displayName: Use .NET Core sdk 3.1
displayName: Use .NET Core SDK 6
inputs:
packageType: sdk
version: 3.1.x
version: 6.0.x
installationPath: $(Agent.TempDirectory)/dotnet
workingDirectory: $(Agent.TempDirectory)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# First, import the template in an arcade-ified repo to pick up the variables, e.g.:
#
# variables:
# - template: eng/common/templates/variables/pool-providers.yml
# - template: /eng/common/templates/variables/pool-providers.yml
#
# ... then anywhere specifying the pool provider use the runtime variables,
# $(DncEngInternalBuildPool) and $ (DncEngPublicBuildPool), e.g.:
Expand Down Expand Up @@ -45,4 +45,4 @@ variables:
- name: DncEngPublicBuildPool
value: NetCore-Svc-Public
- name: DncEngInternalBuildPool
value: NetCore1ESPool-Svc-Internal
value: NetCore1ESPool-Svc-Internal
4 changes: 3 additions & 1 deletion src/tools/illink/eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ function InitializeBuildTool() {
ExitWithExitCode 1
}
$dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet')
$buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net7.0' }
$buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net8.0' }
} elseif ($msbuildEngine -eq "vs") {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
Expand Down Expand Up @@ -743,6 +743,8 @@ function MSBuild() {
(Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll'))
(Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.Arcade.Sdk.dll'))
(Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.Arcade.Sdk.dll'))
)
$selectedPath = $null
foreach ($path in $possiblePaths) {
Expand Down
4 changes: 3 additions & 1 deletion src/tools/illink/eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ function InitializeBuildTool {
# return values
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
_InitializeBuildToolCommand="msbuild"
_InitializeBuildToolFramework="net7.0"
_InitializeBuildToolFramework="net8.0"
}

# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116
Expand Down Expand Up @@ -428,6 +428,8 @@ function MSBuild {
possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" )
possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" )
possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.Arcade.Sdk.dll" )
for path in "${possiblePaths[@]}"; do
if [[ -f $path ]]; then
selectedPath=$path
Expand Down
6 changes: 3 additions & 3 deletions src/tools/illink/global.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"sdk": {
"version": "7.0.100",
"version": "8.0.100-alpha.1.23061.8",
"allowPrerelease": true,
"rollForward": "major"
},
"tools": {
"dotnet": "7.0.100"
"dotnet": "8.0.100-alpha.1.23061.8"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.22630.1",
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23067.5",
"Microsoft.FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0",
"Microsoft.NET.Sdk.IL": "7.0.0-rtm.22507.1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ invocationExpression.Expression is IdentifierNameSyntax ident1 &&
}
}

static IEnumerable<Diagnostic> GetDynamicallyAccessedMembersDiagnostics (SingleValue sourceValue, SingleValue targetValue, Location location)
static List<Diagnostic> GetDynamicallyAccessedMembersDiagnostics (SingleValue sourceValue, SingleValue targetValue, Location location)
{
// The target should always be an annotated value, but the visitor design currently prevents
// declaring this in the type system.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ partial struct ParameterProxy
{
public ParameterProxy (IParameterSymbol parameter)
{
Method = (new ((IMethodSymbol) parameter.ContainingSymbol));
Method = new ((IMethodSymbol) parameter.ContainingSymbol);
Index = (ParameterIndex) parameter.Ordinal + (Method.HasImplicitThis () ? 1 : 0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,8 @@ public DefaultValueDictionary<TKey, TValue> Clone ()
// Prevent warning CS0659 https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs0659.
// This type should never be used as a dictionary key.
public override int GetHashCode () => throw new NotImplementedException ();

public static bool operator == (DefaultValueDictionary<TKey, TValue> left, DefaultValueDictionary<TKey, TValue> right) => left.Equals (right);
public static bool operator != (DefaultValueDictionary<TKey, TValue> left, DefaultValueDictionary<TKey, TValue> right) => !(left == right);
}
}
3 changes: 3 additions & 0 deletions src/tools/illink/src/ILLink.Shared/DataFlow/MaybeLattice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public Maybe<T> Clone ()
return new (copyValue.DeepCopy ());
return new (value);
}

public static bool operator == (Maybe<T> left, Maybe<T> right) => left.Equals (right);
public static bool operator != (Maybe<T> left, Maybe<T> right) => !(left == right);
}

public struct MaybeLattice<T, TValueLattice> : ILattice<Maybe<T>>
Expand Down
3 changes: 3 additions & 0 deletions src/tools/illink/src/ILLink.Shared/DataFlow/ValueSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ public bool Equals (ValueSet<TValue> other)
}
}

public static bool operator == (ValueSet<TValue> left, ValueSet<TValue> right) => left.Equals (right);
public static bool operator != (ValueSet<TValue> left, ValueSet<TValue> right) => !(left == right);

public override int GetHashCode ()
{
if (_values == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public static (string Namespace, string Name) GetNamespaceAndName (this WellKnow
WellKnownType.System_NotSupportedException => ("System", "NotSupportedException"),
WellKnownType.System_Runtime_CompilerServices_DisablePrivateReflectionAttribute => ("System.Runtime.CompilerServices", "DisablePrivateReflectionAttribute"),
WellKnownType.System_Void => ("System", "Void"),
_ => throw new System.ArgumentException (type.ToString ())
};
}
public static string GetNamespace (this WellKnownType type) => GetNamespaceAndName (type).Namespace;
Expand Down
2 changes: 2 additions & 0 deletions src/tools/illink/src/ILLink.Tasks/ILLink.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<Nullable>disable</Nullable>
<!-- Targets don't match the package id. This is intentional. -->
<NoWarn>$(NoWarn);NU5129</NoWarn>
<!-- Workaround for possible SDK issue - see https://github.com/dotnet/linker/issues/3190 -->
<IncludeProjectsNotInAssetsFileInDepsFile>true</IncludeProjectsNotInAssetsFileInDepsFile>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/tools/illink/src/ILLink.Tasks/LinkTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public string ILLinkPath {

var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location);
// The linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks.
_illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net7.0", "illink.dll");
_illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net8.0", "illink.dll");
return _illinkPath;
}
set => _illinkPath = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ public HoistedLocalKey (FieldDefinition field)
public override bool Equals (object? obj) => obj is HoistedLocalKey other && Equals (other);

public override int GetHashCode () => Field.GetHashCode ();

public static bool operator == (HoistedLocalKey left, HoistedLocalKey right) => left.Equals (right);
public static bool operator != (HoistedLocalKey left, HoistedLocalKey right) => !(left == right);
}
}
3 changes: 3 additions & 0 deletions src/tools/illink/src/linker/Linker.Dataflow/ValueNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,8 @@ public ValueBasicBlockPair (MultiValue value, int basicBlockIndex)
public override bool Equals (object? obj) => obj is ValueBasicBlockPair other && Equals (other);

public override int GetHashCode () => HashUtils.Combine (Value.GetHashCode (), BasicBlockIndex);

public static bool operator == (ValueBasicBlockPair left, ValueBasicBlockPair right) => left.Equals (right);
public static bool operator != (ValueBasicBlockPair left, ValueBasicBlockPair right) => !(left == right);
}
}
Loading

0 comments on commit d78e9ef

Please sign in to comment.