blob: 46d92a2baf03a1d476812c2772b72408fd5ddad1 (
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
|
// 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 Internal.Text;
namespace ILCompiler.DependencyAnalysis
{
public class LoopHijackFlagNode : ObjectNode, ISymbolDefinitionNode
{
public LoopHijackFlagNode()
{
}
public int Offset => 0;
protected override string GetName(NodeFactory factory) => "LoopHijackFlag";
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
sb.Append("LoopHijackFlag");
}
public override ObjectNodeSection Section
{
get
{
return ObjectNodeSection.DataSection;
}
}
public override bool IsShareable => true;
public override bool StaticDependenciesAreComputed => true;
public override int ClassCode => -266743363;
public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
{
// Emit a 4-byte integer flag with initial value of 0.
// TODO: define it as "comdat select any" when multiple object files present.
ObjectDataBuilder objData = new ObjectDataBuilder(factory, relocsOnly);
objData.RequireInitialAlignment(4);
objData.AddSymbol(this);
objData.EmitInt(0);
return objData.ToObjectData();
}
}
}
|