-
Notifications
You must be signed in to change notification settings - Fork 10
/
DebugMemberLayout.cs
38 lines (34 loc) · 1.78 KB
/
DebugMemberLayout.cs
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
// -----------------------------------------------------------------------
// <copyright file="DebugMemberLayout.cs" company="Ubiquity.NET Contributors">
// Copyright (c) Ubiquity.NET Contributors. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------
namespace Ubiquity.NET.Llvm.DebugInfo
{
/// <summary>DebugMemberLayout is used to define custom layout information for structure members</summary>
/// <remarks>
/// Ordinarily layout information is handle automatically in
/// <see href="xref:Ubiquity.NET.Llvm.DebugInfo.DebugStructType.SetBody*">DebugStructType.SetBody</see>
/// however in cases where explicitly controlled (or "packed") layout is required, instances of DebugMemberLayout are
/// used to provide the information necessary to generate a proper type and debug information.
/// </remarks>
public class DebugMemberLayout
{
/// <summary>Initializes a new instance of the <see cref="DebugMemberLayout"/> class.</summary>
/// <param name="bitSize">Size of the member in bits</param>
/// <param name="bitAlignment">Alignment of the member in bits</param>
/// <param name="bitOffset">Offset of the member in bits</param>
public DebugMemberLayout( ulong bitSize, uint bitAlignment, ulong bitOffset )
{
BitSize = bitSize;
BitAlignment = bitAlignment;
BitOffset = bitOffset;
}
/// <summary>Gets the bit size for the field</summary>
public ulong BitSize { get; }
/// <summary>Gets the bit alignment for the field</summary>
public uint BitAlignment { get; }
/// <summary>Gets the bit offset for the field in it's containing type</summary>
public ulong BitOffset { get; }
}
}