LLDB mainline
DWARFASTParserClang::FieldInfo Struct Reference

Public Member Functions

 FieldInfo ()=default
void SetIsBitfield (bool flag)
bool IsBitfield () const
void SetIsArtificial (bool flag)
bool IsArtificial () const
bool NextBitfieldOffsetIsValid (const uint64_t next_bit_offset) const
uint64_t GetFieldEnd () const
 Returns the offset in bits of where the storage this field occupies ends.
void SetEffectiveFieldEnd (uint64_t val)
uint64_t GetEffectiveFieldEnd () const
 If this field was folded into storage of a previous field, returns the offset in bits of where that storage ends.

Public Attributes

uint64_t bit_size = 0
 Size in bits that this field occupies.
uint64_t bit_offset = 0
 Offset of this field in bits from the beginning of the containing struct.
std::optional< uint64_t > effective_field_end
 In case this field is folded into the storage of a previous member's storage (for example with [[no_unique_address]]), the effective field end is the offset in bits from the beginning of the containing struct where the field we were folded into ended.
bool is_bitfield = false
 Set to 'true' if this field is a bit-field.
bool is_artificial = false
 Set to 'true' if this field is DW_AT_artificial.

Detailed Description

Definition at line 272 of file DWARFASTParserClang.h.

Constructor & Destructor Documentation

◆ FieldInfo()

DWARFASTParserClang::FieldInfo::FieldInfo ( )
default

Member Function Documentation

◆ GetEffectiveFieldEnd()

uint64_t DWARFASTParserClang::FieldInfo::GetEffectiveFieldEnd ( ) const
inline

If this field was folded into storage of a previous field, returns the offset in bits of where that storage ends.

Otherwise, returns the regular field end (see GetFieldEnd).

Definition at line 319 of file DWARFASTParserClang.h.

References effective_field_end, and GetFieldEnd().

Referenced by DWARFASTParserClang::AddUnnamedBitfieldToRecordTypeIfNeeded(), and DWARFASTParserClang::ParseSingleMember().

◆ GetFieldEnd()

uint64_t DWARFASTParserClang::FieldInfo::GetFieldEnd ( ) const
inline

Returns the offset in bits of where the storage this field occupies ends.

Definition at line 312 of file DWARFASTParserClang.h.

References bit_offset, and bit_size.

Referenced by GetEffectiveFieldEnd(), and DWARFASTParserClang::ParseSingleMember().

◆ IsArtificial()

bool DWARFASTParserClang::FieldInfo::IsArtificial ( ) const
inline

Definition at line 302 of file DWARFASTParserClang.h.

References is_artificial.

Referenced by DWARFASTParserClang::ShouldCreateUnnamedBitfield().

◆ IsBitfield()

bool DWARFASTParserClang::FieldInfo::IsBitfield ( ) const
inline

◆ NextBitfieldOffsetIsValid()

bool DWARFASTParserClang::FieldInfo::NextBitfieldOffsetIsValid ( const uint64_t next_bit_offset) const
inline

Definition at line 304 of file DWARFASTParserClang.h.

References bit_offset, and bit_size.

Referenced by DWARFASTParserClang::ParseSingleMember().

◆ SetEffectiveFieldEnd()

void DWARFASTParserClang::FieldInfo::SetEffectiveFieldEnd ( uint64_t val)
inline

Definition at line 314 of file DWARFASTParserClang.h.

References effective_field_end.

Referenced by DWARFASTParserClang::ParseSingleMember().

◆ SetIsArtificial()

void DWARFASTParserClang::FieldInfo::SetIsArtificial ( bool flag)
inline

Definition at line 301 of file DWARFASTParserClang.h.

References is_artificial.

Referenced by DWARFASTParserClang::ParseSingleMember().

◆ SetIsBitfield()

void DWARFASTParserClang::FieldInfo::SetIsBitfield ( bool flag)
inline

Definition at line 298 of file DWARFASTParserClang.h.

References is_bitfield.

Referenced by DWARFASTParserClang::ParseSingleMember().

Member Data Documentation

◆ bit_offset

uint64_t DWARFASTParserClang::FieldInfo::bit_offset = 0

Offset of this field in bits from the beginning of the containing struct.

Can but need not be the DW_AT_data_bit_offset of the field.

Definition at line 280 of file DWARFASTParserClang.h.

Referenced by DWARFASTParserClang::AddUnnamedBitfieldToRecordTypeIfNeeded(), GetFieldEnd(), NextBitfieldOffsetIsValid(), DWARFASTParserClang::ParseSingleMember(), and DWARFASTParserClang::ShouldCreateUnnamedBitfield().

◆ bit_size

uint64_t DWARFASTParserClang::FieldInfo::bit_size = 0

Size in bits that this field occupies.

Can but need not be the DW_AT_bit_size of the field.

Definition at line 275 of file DWARFASTParserClang.h.

Referenced by GetFieldEnd(), NextBitfieldOffsetIsValid(), DWARFASTParserClang::ParseSingleMember(), and DWARFASTParserClang::ShouldCreateUnnamedBitfield().

◆ effective_field_end

std::optional<uint64_t> DWARFASTParserClang::FieldInfo::effective_field_end

In case this field is folded into the storage of a previous member's storage (for example with [[no_unique_address]]), the effective field end is the offset in bits from the beginning of the containing struct where the field we were folded into ended.

Definition at line 288 of file DWARFASTParserClang.h.

Referenced by GetEffectiveFieldEnd(), and SetEffectiveFieldEnd().

◆ is_artificial

bool DWARFASTParserClang::FieldInfo::is_artificial = false

Set to 'true' if this field is DW_AT_artificial.

Definition at line 294 of file DWARFASTParserClang.h.

Referenced by IsArtificial(), and SetIsArtificial().

◆ is_bitfield

bool DWARFASTParserClang::FieldInfo::is_bitfield = false

Set to 'true' if this field is a bit-field.

Definition at line 291 of file DWARFASTParserClang.h.

Referenced by IsBitfield(), DWARFASTParserClang::ParseSingleMember(), and SetIsBitfield().


The documentation for this struct was generated from the following file: