LLVM  12.0.0git
Classes | Public Types | Public Member Functions | List of all members
llvm::DWARFAbbreviationDeclaration Class Reference

#include "llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h"


struct  AttributeSpec

Public Types

using AttributeSpecVector = SmallVector< AttributeSpec, 8 >
using attr_iterator_range = iterator_range< AttributeSpecVector::const_iterator >

Public Member Functions

 DWARFAbbreviationDeclaration ()
uint32_t getCode () const
uint8_t getCodeByteSize () const
dwarf::Tag getTag () const
bool hasChildren () const
attr_iterator_range attributes () const
dwarf::Form getFormByIndex (uint32_t idx) const
size_t getNumAttributes () const
dwarf::Attribute getAttrByIndex (uint32_t idx) const
Optional< uint32_tfindAttributeIndex (dwarf::Attribute attr) const
 Get the index of the specified attribute. More...
Optional< DWARFFormValuegetAttributeValue (const uint64_t DIEOffset, const dwarf::Attribute Attr, const DWARFUnit &U) const
 Extract a DWARF form value from a DIE specified by DIE offset. More...
bool extract (DataExtractor Data, uint64_t *OffsetPtr)
void dump (raw_ostream &OS) const
Optional< size_t > getFixedAttributesByteSize (const DWARFUnit &U) const

Detailed Description

Definition at line 27 of file DWARFAbbreviationDeclaration.h.

Member Typedef Documentation

◆ attr_iterator_range

Definition at line 94 of file DWARFAbbreviationDeclaration.h.

◆ AttributeSpecVector

Definition at line 84 of file DWARFAbbreviationDeclaration.h.

Constructor & Destructor Documentation

◆ DWARFAbbreviationDeclaration()

DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration ( )

Definition at line 35 of file DWARFAbbreviationDeclaration.cpp.

References clear().

Member Function Documentation

◆ attributes()

attr_iterator_range llvm::DWARFAbbreviationDeclaration::attributes ( ) const

◆ dump()

void DWARFAbbreviationDeclaration::dump ( raw_ostream OS) const

Definition at line 128 of file DWARFAbbreviationDeclaration.cpp.

References llvm::formatv(), and llvm::dwarf::getTag().

◆ extract()

bool DWARFAbbreviationDeclaration::extract ( DataExtractor  Data,
uint64_t *  OffsetPtr 

◆ findAttributeIndex()

Optional< uint32_t > DWARFAbbreviationDeclaration::findAttributeIndex ( dwarf::Attribute  attr) const

Get the index of the specified attribute.

Searches the this abbreviation declaration for the index of the specified attribute.

attrDWARF attribute to search for.
Optional index of the attribute if found, None otherwise.

Definition at line 142 of file DWARFAbbreviationDeclaration.cpp.

References llvm::numbers::e, and llvm::None.

◆ getAttrByIndex()

dwarf::Attribute llvm::DWARFAbbreviationDeclaration::getAttrByIndex ( uint32_t  idx) const

◆ getAttributeValue()

Optional< DWARFFormValue > DWARFAbbreviationDeclaration::getAttributeValue ( const uint64_t  DIEOffset,
const dwarf::Attribute  Attr,
const DWARFUnit U 
) const

Extract a DWARF form value from a DIE specified by DIE offset.

Extract an attribute value for a DWARFUnit given the DIE offset and the attribute.

DIEOffsetthe DIE offset that points to the ULEB128 abbreviation code in the .debug_info data.
AttrDWARF attribute to search for.
Uthe DWARFUnit the contains the DIE.
Optional DWARF form value if the attribute was extracted.

Definition at line 150 of file DWARFAbbreviationDeclaration.cpp.

References llvm::DWARFFormValue::createFromSValue(), llvm::DWARFFormValue::extractValue(), llvm::DWARFUnit::getDebugInfoExtractor(), llvm::DWARFUnit::getFormParams(), llvm::None, Offset, and llvm::DWARFFormValue::skipValue().

◆ getCode()

uint32_t llvm::DWARFAbbreviationDeclaration::getCode ( ) const

◆ getCodeByteSize()

uint8_t llvm::DWARFAbbreviationDeclaration::getCodeByteSize ( ) const

Definition at line 89 of file DWARFAbbreviationDeclaration.h.

◆ getFixedAttributesByteSize()

Optional< size_t > DWARFAbbreviationDeclaration::getFixedAttributesByteSize ( const DWARFUnit U) const

Definition at line 210 of file DWARFAbbreviationDeclaration.cpp.

References llvm::None.

◆ getFormByIndex()

dwarf::Form llvm::DWARFAbbreviationDeclaration::getFormByIndex ( uint32_t  idx) const

◆ getNumAttributes()

size_t llvm::DWARFAbbreviationDeclaration::getNumAttributes ( ) const

◆ getTag()

dwarf::Tag llvm::DWARFAbbreviationDeclaration::getTag ( ) const

Definition at line 90 of file DWARFAbbreviationDeclaration.h.

Referenced by llvm::DWARFDebugInfoEntry::getTag().

◆ hasChildren()

bool llvm::DWARFAbbreviationDeclaration::hasChildren ( ) const

The documentation for this class was generated from the following files: