LLVM  5.0.0
Public Member Functions | Public Attributes | List of all members
llvm::DWARFAbbreviationDeclaration::AttributeSpec Struct Reference

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

Collaboration diagram for llvm::DWARFAbbreviationDeclaration::AttributeSpec:
[legend]

Public Member Functions

 AttributeSpec (dwarf::Attribute A, dwarf::Form F, Optional< int64_t > V)
 
bool isImplicitConst () const
 
Optional< int64_t > getByteSize (const DWARFUnit &U) const
 Get the fixed byte size of this Form if possible. More...
 

Public Attributes

dwarf::Attribute Attr
 
dwarf::Form Form
 
Optional< int64_t > ByteSizeOrValue
 The following field is used for ByteSize for non-implicit_const attributes and as value for implicit_const ones, indicated by Form == DW_FORM_implicit_const. More...
 

Detailed Description

Definition at line 30 of file DWARFAbbreviationDeclaration.h.

Constructor & Destructor Documentation

llvm::DWARFAbbreviationDeclaration::AttributeSpec::AttributeSpec ( dwarf::Attribute  A,
dwarf::Form  F,
Optional< int64_t >  V 
)
inline

Definition at line 31 of file DWARFAbbreviationDeclaration.h.

Member Function Documentation

Optional< int64_t > DWARFAbbreviationDeclaration::AttributeSpec::getByteSize ( const DWARFUnit &  U) const

Get the fixed byte size of this Form if possible.

This function might use the DWARFUnit to calculate the size of the Form, like for DW_AT_address and DW_AT_ref_addr, so this isn't just an accessor for the ByteSize member.

Definition at line 214 of file DWARFAbbreviationDeclaration.cpp.

References llvm::DWARFFormValue::getFixedByteSize(), and llvm::DWARFUnit::getFormParams().

bool llvm::DWARFAbbreviationDeclaration::AttributeSpec::isImplicitConst ( ) const
inline

Definition at line 52 of file DWARFAbbreviationDeclaration.h.

References Form.

Member Data Documentation

dwarf::Attribute llvm::DWARFAbbreviationDeclaration::AttributeSpec::Attr

Definition at line 34 of file DWARFAbbreviationDeclaration.h.

Optional<int64_t> llvm::DWARFAbbreviationDeclaration::AttributeSpec::ByteSizeOrValue

The following field is used for ByteSize for non-implicit_const attributes and as value for implicit_const ones, indicated by Form == DW_FORM_implicit_const.

The following cases are distinguished:

  • Form != DW_FORM_implicit_const and ByteSizeOrValue has a value: ByteSizeOrValue contains the fixed size in bytes for the Form in this object.
  • Form != DW_FORM_implicit_const and ByteSizeOrValue is None: byte size of Form either varies according to the DWARFUnit that it is contained in or the value size varies and must be decoded from the debug information in order to determine its size.
  • Form == DW_FORM_implicit_const: ByteSizeOrValue contains value for the implicit_const attribute.

Definition at line 50 of file DWARFAbbreviationDeclaration.h.

dwarf::Form llvm::DWARFAbbreviationDeclaration::AttributeSpec::Form

Definition at line 35 of file DWARFAbbreviationDeclaration.h.

Referenced by isImplicitConst().


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