Skip to content

Commit 351d2bf

Browse files
authored
Merge pull request #81450 from tlakollo/SyncILLink
2 parents 253cac9 + 844702d commit 351d2bf

37 files changed

+425
-113
lines changed

src/tools/illink/illink.sln

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.30524.135
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.5.33209.295
55
MinimumVisualStudioVersion = 15.0.26124.0
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "src\linker\Mono.Linker.csproj", "{DD28E2B1-057B-4B4D-A04D-B2EBD9E76E46}"
77
EndProject
@@ -33,16 +33,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tlens", "src\tlens\tlens.cs
3333
EndProject
3434
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{6D20F334-B7E4-4585-854B-8A0E2B29B4AA}"
3535
EndProject
36-
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ILLink.Shared", "src\ILLink.Shared\ILLink.Shared.shproj", "{92F5E753-2179-46DC-BDCE-736858C18DC7}"
36+
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ILLink.Shared", "src\ILLink.Shared\ILLink.Shared.shproj", "{FF598E93-8E9E-4091-9F50-61A7572663AE}"
3737
EndProject
3838
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer.Tests.Generator", "test\ILLink.RoslynAnalyzer.Tests.Generator\ILLink.RoslynAnalyzer.Tests.Generator.csproj", "{3DDE7064-4B68-4979-8843-FDF4CE5A5140}"
3939
EndProject
40+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "external", "external", "{8FD57ADB-B449-4960-A141-845C1E2E26EC}"
41+
EndProject
42+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "external\cecil\Mono.Cecil.csproj", "{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}"
43+
EndProject
44+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cecil", "cecil", "{223B8007-F26C-4E28-B28D-E43C97F7EE23}"
45+
EndProject
46+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "symbols", "symbols", "{19C783E3-B710-4F25-A977-0ADDA4D2CFEE}"
47+
EndProject
48+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Pdb", "external\cecil\symbols\pdb\Mono.Cecil.Pdb.csproj", "{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}"
49+
EndProject
4050
Global
41-
GlobalSection(SharedMSBuildProjectFiles) = preSolution
42-
src\ILLink.Shared\ILLink.Shared.projitems*{92f5e753-2179-46dc-bdce-736858c18dc7}*SharedItemsImports = 13
43-
src\ILLink.Shared\ILLink.Shared.projitems*{dd28e2b1-057b-4b4d-a04d-b2ebd9e76e46}*SharedItemsImports = 5
44-
src\ILLink.Shared\ILLink.Shared.projitems*{f1a44a78-34ee-408b-8285-9a26f0e7d4f2}*SharedItemsImports = 5
45-
EndGlobalSection
4651
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4752
Debug|Any CPU = Debug|Any CPU
4853
Debug|x64 = Debug|x64
@@ -208,6 +213,30 @@ Global
208213
{3DDE7064-4B68-4979-8843-FDF4CE5A5140}.Release|x64.Build.0 = Release|Any CPU
209214
{3DDE7064-4B68-4979-8843-FDF4CE5A5140}.Release|x86.ActiveCfg = Release|Any CPU
210215
{3DDE7064-4B68-4979-8843-FDF4CE5A5140}.Release|x86.Build.0 = Release|Any CPU
216+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
217+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
218+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Debug|x64.ActiveCfg = Debug|Any CPU
219+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Debug|x64.Build.0 = Debug|Any CPU
220+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Debug|x86.ActiveCfg = Debug|Any CPU
221+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Debug|x86.Build.0 = Debug|Any CPU
222+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
223+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Release|Any CPU.Build.0 = Release|Any CPU
224+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Release|x64.ActiveCfg = Release|Any CPU
225+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Release|x64.Build.0 = Release|Any CPU
226+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Release|x86.ActiveCfg = Release|Any CPU
227+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D}.Release|x86.Build.0 = Release|Any CPU
228+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
229+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
230+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Debug|x64.ActiveCfg = Debug|Any CPU
231+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Debug|x64.Build.0 = Debug|Any CPU
232+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Debug|x86.ActiveCfg = Debug|Any CPU
233+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Debug|x86.Build.0 = Debug|Any CPU
234+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
235+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Release|Any CPU.Build.0 = Release|Any CPU
236+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Release|x64.ActiveCfg = Release|Any CPU
237+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Release|x64.Build.0 = Release|Any CPU
238+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Release|x86.ActiveCfg = Release|Any CPU
239+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E}.Release|x86.Build.0 = Release|Any CPU
211240
EndGlobalSection
212241
GlobalSection(SolutionProperties) = preSolution
213242
HideSolutionNode = FALSE
@@ -223,8 +252,17 @@ Global
223252
{8DA71B3B-5809-44E5-A018-5DE5C6FF6C2A} = {03EB085F-3E2E-4A68-A7DF-951ADF59A0CC}
224253
{6D20F334-B7E4-4585-854B-8A0E2B29B4AA} = {AA0569FB-73E9-4B42-9A19-714BB1229DAE}
225254
{3DDE7064-4B68-4979-8843-FDF4CE5A5140} = {C2969923-7BAA-4FE4-853C-F670B0D3C6C8}
255+
{7C068318-84AF-4861-9E5F-6F8A3BF38C9D} = {8FD57ADB-B449-4960-A141-845C1E2E26EC}
256+
{223B8007-F26C-4E28-B28D-E43C97F7EE23} = {8FD57ADB-B449-4960-A141-845C1E2E26EC}
257+
{19C783E3-B710-4F25-A977-0ADDA4D2CFEE} = {223B8007-F26C-4E28-B28D-E43C97F7EE23}
258+
{AF7722A0-D1A7-4294-A181-B88B6BD67C6E} = {19C783E3-B710-4F25-A977-0ADDA4D2CFEE}
226259
EndGlobalSection
227260
GlobalSection(ExtensibilityGlobals) = postSolution
228261
SolutionGuid = {E43A3901-42B0-48CA-BB36-5CD40A99A6EE}
229262
EndGlobalSection
263+
GlobalSection(SharedMSBuildProjectFiles) = preSolution
264+
src\ILLink.Shared\ILLink.Shared.projitems*{dd28e2b1-057b-4b4d-a04d-b2ebd9e76e46}*SharedItemsImports = 5
265+
src\ILLink.Shared\ILLink.Shared.projitems*{f1a44a78-34ee-408b-8285-9a26f0e7d4f2}*SharedItemsImports = 5
266+
src\ILLink.Shared\ILLink.Shared.projitems*{ff598e93-8e9e-4091-9f50-61a7572663ae}*SharedItemsImports = 13
267+
EndGlobalSection
230268
EndGlobal

src/tools/illink/src/ILLink.RoslynAnalyzer/TrimAnalysis/ParameterProxy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ partial struct ParameterProxy
1111
{
1212
public ParameterProxy (IParameterSymbol parameter)
1313
{
14-
Method = (new ((IMethodSymbol) parameter.ContainingSymbol));
14+
Method = new ((IMethodSymbol) parameter.ContainingSymbol);
1515
Index = (ParameterIndex) parameter.Ordinal + (Method.HasImplicitThis () ? 1 : 0);
1616
}
1717

src/tools/illink/src/ILLink.Shared/DataFlow/DefaultValueDictionary.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,8 @@ public DefaultValueDictionary<TKey, TValue> Clone ()
108108
// Prevent warning CS0659 https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs0659.
109109
// This type should never be used as a dictionary key.
110110
public override int GetHashCode () => throw new NotImplementedException ();
111+
112+
public static bool operator == (DefaultValueDictionary<TKey, TValue> left, DefaultValueDictionary<TKey, TValue> right) => left.Equals (right);
113+
public static bool operator != (DefaultValueDictionary<TKey, TValue> left, DefaultValueDictionary<TKey, TValue> right) => !(left == right);
111114
}
112115
}

src/tools/illink/src/ILLink.Shared/DataFlow/MaybeLattice.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public Maybe<T> Clone ()
2626
return new (copyValue.DeepCopy ());
2727
return new (value);
2828
}
29+
30+
public static bool operator == (Maybe<T> left, Maybe<T> right) => left.Equals (right);
31+
public static bool operator != (Maybe<T> left, Maybe<T> right) => !(left == right);
2932
}
3033

3134
public struct MaybeLattice<T, TValueLattice> : ILattice<Maybe<T>>

src/tools/illink/src/ILLink.Shared/DataFlow/ValueSet.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ public bool Equals (ValueSet<TValue> other)
120120
}
121121
}
122122

123+
public static bool operator == (ValueSet<TValue> left, ValueSet<TValue> right) => left.Equals (right);
124+
public static bool operator != (ValueSet<TValue> left, ValueSet<TValue> right) => !(left == right);
125+
123126
public override int GetHashCode ()
124127
{
125128
if (_values == null)

src/tools/illink/src/ILLink.Shared/TypeSystemProxy/WellKnownType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public static (string Namespace, string Name) GetNamespaceAndName (this WellKnow
3838
WellKnownType.System_NotSupportedException => ("System", "NotSupportedException"),
3939
WellKnownType.System_Runtime_CompilerServices_DisablePrivateReflectionAttribute => ("System.Runtime.CompilerServices", "DisablePrivateReflectionAttribute"),
4040
WellKnownType.System_Void => ("System", "Void"),
41+
_ => throw new System.ArgumentException (type.ToString ())
4142
};
4243
}
4344
public static string GetNamespace (this WellKnownType type) => GetNamespaceAndName (type).Namespace;

src/tools/illink/src/linker/Linker.Dataflow/HoistedLocalKey.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ public HoistedLocalKey (FieldDefinition field)
2626
public override bool Equals (object? obj) => obj is HoistedLocalKey other && Equals (other);
2727

2828
public override int GetHashCode () => Field.GetHashCode ();
29+
30+
public static bool operator == (HoistedLocalKey left, HoistedLocalKey right) => left.Equals (right);
31+
public static bool operator != (HoistedLocalKey left, HoistedLocalKey right) => !(left == right);
2932
}
3033
}

src/tools/illink/src/linker/Linker.Dataflow/ValueNode.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,8 @@ public ValueBasicBlockPair (MultiValue value, int basicBlockIndex)
6464
public override bool Equals (object? obj) => obj is ValueBasicBlockPair other && Equals (other);
6565

6666
public override int GetHashCode () => HashUtils.Combine (Value.GetHashCode (), BasicBlockIndex);
67+
68+
public static bool operator == (ValueBasicBlockPair left, ValueBasicBlockPair right) => left.Equals (right);
69+
public static bool operator != (ValueBasicBlockPair left, ValueBasicBlockPair right) => !(left == right);
6770
}
6871
}

src/tools/illink/src/linker/Linker.Steps/MarkStep.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ protected void MarkField (FieldReference reference, DependencyInfo reason, in Me
16101610
Debug.Assert (reason.Kind == DependencyKind.FieldAccess || reason.Kind == DependencyKind.Ldtoken);
16111611
// Blame the field reference (without actually marking) on the original reason.
16121612
Tracer.AddDirectDependency (reference, reason, marked: false);
1613-
MarkType (reference.DeclaringType, new DependencyInfo (DependencyKind.DeclaringType, reference), new MessageOrigin (Context.TryResolve (reference)));
1613+
MarkType (reference.DeclaringType, new DependencyInfo (DependencyKind.DeclaringType, reference));
16141614

16151615
// Blame the field definition that we will resolve on the field reference.
16161616
reason = new DependencyInfo (DependencyKind.FieldOnGenericInstance, reference);

src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpAnalyzerVerifier`1.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,7 @@ static bool IsMessageMatch (Diagnostic actual, ImmutableArray<string> actualArgu
585585

586586
public MatchQuality (int value)
587587
{
588-
if (value < 0) {
589-
throw new ArgumentOutOfRangeException (nameof (value));
590-
}
588+
ArgumentOutOfRangeException.ThrowIfNegative (value);
591589

592590
_value = value;
593591
}

0 commit comments

Comments
 (0)