/ src / ARMeilleure / CodeGen / Linking / RelocInfo.cs
RelocInfo.cs
 1  using System;
 2  
 3  namespace ARMeilleure.CodeGen.Linking
 4  {
 5      /// <summary>
 6      /// Represents relocation information about a <see cref="CompiledFunction"/>.
 7      /// </summary>
 8      readonly struct RelocInfo
 9      {
10          /// <summary>
11          /// Gets an empty <see cref="RelocInfo"/>.
12          /// </summary>
13          public static RelocInfo Empty { get; } = new RelocInfo(null);
14  
15          private readonly RelocEntry[] _entries;
16  
17          /// <summary>
18          /// Gets the set of <see cref="RelocEntry"/>.
19          /// </summary>
20          public ReadOnlySpan<RelocEntry> Entries => _entries;
21  
22          /// <summary>
23          /// Initializes a new instance of the <see cref="RelocInfo"/> struct with the specified set of
24          /// <see cref="RelocEntry"/>.
25          /// </summary>
26          /// <param name="entries">Set of <see cref="RelocInfo"/> to use</param>
27          public RelocInfo(RelocEntry[] entries)
28          {
29              _entries = entries;
30          }
31      }
32  }