Skip to content

Commit 02717d9

Browse files
committed
Add changes so there are no errors in the project
1 parent a69242e commit 02717d9

File tree

2 files changed

+241
-354
lines changed

2 files changed

+241
-354
lines changed

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/FeatureSettings.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System;
5+
using System.Collections.Generic;
56
using System.Xml.XPath;
67
using ILLink.Shared;
8+
using Internal.TypeSystem;
79

8-
namespace Mono.Linker
10+
namespace ILCompiler
911
{
1012
public static class FeatureSettings
1113
{
12-
public static bool ShouldProcessElement(XPathNavigator nav, LinkContext context, string documentLocation)
14+
public static bool ShouldProcessElement(XPathNavigator nav, IReadOnlyDictionary<string, bool> featureSwitchValues)
1315
{
1416
var feature = GetAttribute(nav, "feature");
1517
if (string.IsNullOrEmpty(feature))
@@ -18,25 +20,25 @@ public static bool ShouldProcessElement(XPathNavigator nav, LinkContext context,
1820
var value = GetAttribute(nav, "featurevalue");
1921
if (string.IsNullOrEmpty(value))
2022
{
21-
context.LogError(null, DiagnosticId.XmlFeatureDoesNotSpecifyFeatureValue, documentLocation, feature);
23+
//context.LogError(null, DiagnosticId.XmlFeatureDoesNotSpecifyFeatureValue, documentLocation, feature);
2224
return false;
2325
}
2426

2527
if (!bool.TryParse(value, out bool bValue))
2628
{
27-
context.LogError(null, DiagnosticId.XmlUnsupportedNonBooleanValueForFeature, documentLocation, feature);
29+
//context.LogError(null, DiagnosticId.XmlUnsupportedNonBooleanValueForFeature, documentLocation, feature);
2830
return false;
2931
}
3032

3133
var isDefault = GetAttribute(nav, "featuredefault");
3234
bool bIsDefault = false;
3335
if (!string.IsNullOrEmpty(isDefault) && (!bool.TryParse(isDefault, out bIsDefault) || !bIsDefault))
3436
{
35-
context.LogError(null, DiagnosticId.XmlDocumentLocationHasInvalidFeatureDefault, documentLocation);
37+
//context.LogError(null, DiagnosticId.XmlDocumentLocationHasInvalidFeatureDefault, documentLocation);
3638
return false;
3739
}
3840

39-
if (!context.FeatureSettings.TryGetValue(feature, out bool featureSetting))
41+
if (!featureSwitchValues.TryGetValue(feature, out bool featureSetting))
4042
return bIsDefault;
4143

4244
return bValue == featureSetting;

0 commit comments

Comments
 (0)