24void DWARFAbbreviationDeclaration::clear() {
 
   29  AttributeSpecs.clear();
 
   30  FixedAttributeSize.reset();
 
   42  Code = 
Data.getULEB128(OffsetPtr, &Err);
 
   44    return std::move(Err);
 
   49  CodeByteSize = *OffsetPtr - 
Offset;
 
   52    return std::move(Err);
 
   54  if (Tag == DW_TAG_null) {
 
   57        "abbreviation declaration requires a non-null tag");
 
   61    return std::move(Err);
 
   67  FixedAttributeSize = FixedSizeInfo();
 
   70  while (
Data.isValidOffset(*OffsetPtr)) {
 
   73      return std::move(Err);
 
   75    auto F = 
static_cast<Form>(
Data.getULEB128(OffsetPtr, &Err));
 
   77      return std::move(Err);
 
   92          "malformed abbreviation declaration attribute. Either the attribute " 
   93          "or the form is zero while the other is not");
 
   96    bool IsImplicitConst = (
F == DW_FORM_implicit_const);
 
   97    if (IsImplicitConst) {
 
   98      int64_t V = 
Data.getSLEB128(OffsetPtr);
 
  102    std::optional<uint8_t> ByteSize;
 
  107      if (FixedAttributeSize)
 
  108        ++FixedAttributeSize->NumAddrs;
 
  111    case DW_FORM_ref_addr:
 
  112      if (FixedAttributeSize)
 
  113        ++FixedAttributeSize->NumRefAddrs;
 
  117    case DW_FORM_GNU_ref_alt:
 
  118    case DW_FORM_GNU_strp_alt:
 
  119    case DW_FORM_line_strp:
 
  120    case DW_FORM_sec_offset:
 
  121    case DW_FORM_strp_sup:
 
  122      if (FixedAttributeSize)
 
  123        ++FixedAttributeSize->NumDwarfOffsets;
 
  130        if (FixedAttributeSize)
 
  131          FixedAttributeSize->NumBytes += *ByteSize;
 
  137      FixedAttributeSize.reset();
 
  144      "abbreviation declaration attribute list was not terminated with a null " 
 
  149  OS << 
'[' << 
getCode() << 
"] ";
 
  151  OS << 
"\tDW_CHILDREN_" << (
hasChildren() ? 
"yes" : 
"no") << 
'\n';
 
  154    if (
Spec.isImplicitConst())
 
  155      OS << 
'\t' << 
Spec.getImplicitConstValue();
 
 
  161std::optional<uint32_t>
 
  163  for (
uint32_t i = 0, e = AttributeSpecs.size(); i != e; ++i) {
 
  164    if (AttributeSpecs[i].Attr == Attr)
 
 
  177  for (
uint32_t CurAttrIdx = 0; CurAttrIdx != AttrIndex; ++CurAttrIdx)
 
  179    if (
auto FixedSize = AttributeSpecs[CurAttrIdx].getByteSize(U))
 
  183                                &
Offset, U.getFormParams());
 
 
  187std::optional<DWARFFormValue>
 
  190  assert(AttributeSpecs.size() > AttrIndex &&
 
  191         "Attribute Index is out of bounds.");
 
  195  if (
Spec.isImplicitConst())
 
  197                                            Spec.getImplicitConstValue());
 
 
  206std::optional<DWARFFormValue>
 
  221size_t DWARFAbbreviationDeclaration::FixedSizeInfo::getByteSize(
 
  223  size_t ByteSize = NumBytes;
 
  225    ByteSize += NumAddrs * U.getAddressByteSize();
 
  227    ByteSize += NumRefAddrs * U.getRefAddrByteSize();
 
  229    ByteSize += NumDwarfOffsets * U.getDwarfOffsetByteSize();
 
  239  std::optional<int64_t> S;
 
 
  248  if (FixedAttributeSize)
 
  249    return FixedAttributeSize->getByteSize(U);
 
 
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
 
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
 
This file contains constants used for implementing Dwarf debug support.
 
Functions, function parameters, and return types can have attributes to indicate how they should be t...
 
LLVM_ABI llvm::Expected< ExtractState > extract(DataExtractor Data, uint64_t *OffsetPtr)
 
LLVM_ABI uint64_t getAttributeOffsetFromIndex(uint32_t AttrIndex, uint64_t DIEOffset, const DWARFUnit &U) const
Compute an offset from a DIE specified by DIE offset and attribute index.
 
dwarf::Tag getTag() const
 
LLVM_ABI std::optional< uint32_t > findAttributeIndex(dwarf::Attribute attr) const
Get the index of the specified attribute.
 
LLVM_ABI std::optional< DWARFFormValue > 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.
 
LLVM_ABI std::optional< size_t > getFixedAttributesByteSize(const DWARFUnit &U) const
 
LLVM_ABI void dump(raw_ostream &OS) const
 
LLVM_ABI std::optional< DWARFFormValue > getAttributeValueFromOffset(uint32_t AttrIndex, uint64_t Offset, const DWARFUnit &U) const
Extract a DWARF form value from a DIE speccified by attribute index and its offset.
 
LLVM_ABI DWARFAbbreviationDeclaration()
 
Lightweight error class with error context and mandatory checking.
 
static ErrorSuccess success()
Create a success value.
 
Tagged union holding either a T or a Error.
 
This class implements an extremely fast bulk output stream that can only output to a stream.
 
Calculates the starting offsets for various sections within the .debug_names section.
 
LLVM_ABI std::optional< uint8_t > getFixedFormByteSize(dwarf::Form Form, FormParams Params)
Get the fixed byte size for a given form.
 
This is an optimization pass for GlobalISel generic memory operations.
 
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
 
Error make_error(ArgTs &&... Args)
Make a Error instance representing failure using the given error info type.
 
FunctionAddr VTableAddr uintptr_t uintptr_t Data
 
LLVM_ABI std::optional< int64_t > getByteSize(const DWARFUnit &U) const
Get the fixed byte size of this Form if possible.
 
bool isImplicitConst() const