blob: 0aee4c8dbd6b993e7299696eae77bd62517e633d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using ILCompiler.DependencyAnalysisFramework;
using Internal.Text;
namespace ILCompiler.DependencyAnalysis
{
/// <summary>
/// Represents a symbol that is defined externally and statically linked to the output obj file.
/// </summary>
public class ExternSymbolNode : SortableDependencyNode, ISortableSymbolNode
{
private Utf8String _name;
public ExternSymbolNode(Utf8String name)
{
_name = name;
}
protected override string GetName(NodeFactory factory) => $"ExternSymbol {_name.ToString()}";
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
sb.Append(_name);
}
public int Offset => 0;
public virtual bool RepresentsIndirectionCell => false;
public override bool InterestingForDynamicDependencyAnalysis => false;
public override bool HasDynamicDependencies => false;
public override bool HasConditionalStaticDependencies => false;
public override bool StaticDependenciesAreComputed => true;
public override IEnumerable<DependencyListEntry> GetStaticDependencies(NodeFactory factory) => null;
public override IEnumerable<CombinedDependencyListEntry> GetConditionalStaticDependencies(NodeFactory factory) => null;
public override IEnumerable<CombinedDependencyListEntry> SearchDynamicDependencies(List<DependencyNodeCore<NodeFactory>> markedNodes, int firstNode, NodeFactory factory) => null;
#if !SUPPORT_JIT
public override int ClassCode => 1092559304;
public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
{
return _name.CompareTo(((ExternSymbolNode)other)._name);
}
#endif
}
}
|