26 this->ParentIdx = ParentIdx;
27 if (Offset >= UEndOffset) {
28 U.getContext().getWarningHandler()(
30 "DWARF unit from offset 0x%8.8" PRIx64
" incl. "
31 "to offset 0x%8.8" PRIx64
" excl. "
32 "tries to read DIEs at offset 0x%8.8" PRIx64,
33 U.getOffset(), U.getNextUnitOffset(), *OffsetPtr));
43 const auto *AbbrevSet = U.getAbbreviations();
45 U.getContext().getWarningHandler()(
47 "DWARF unit at offset 0x%8.8" PRIx64
" "
48 "contains invalid abbreviation set offset 0x%" PRIx64,
49 U.getOffset(), U.getAbbreviationsOffset()));
54 AbbrevDecl = AbbrevSet->getAbbreviationDeclaration(AbbrCode);
56 U.getContext().getWarningHandler()(
58 "DWARF unit at offset 0x%8.8" PRIx64
" "
59 "contains invalid abbreviation %" PRIu64
" at "
60 "offset 0x%8.8" PRIx64
", valid abbreviations are %s",
61 U.getOffset(), AbbrCode, *OffsetPtr,
62 AbbrevSet->getCodeRange().c_str()));
69 if (std::optional<size_t> FixedSize =
71 *OffsetPtr += *FixedSize;
76 for (
const auto &AttrSpec : AbbrevDecl->
attributes()) {
78 if (
auto FixedSize = AttrSpec.getByteSize(U)) {
80 *OffsetPtr += *FixedSize;
82 OffsetPtr, U.getFormParams())) {
87 "DWARF unit at offset 0x%8.8" PRIx64
" "
88 "contains invalid FORM_* 0x%" PRIx16
" at offset 0x%8.8" PRIx64,
89 U.getOffset(), AttrSpec.Form, *OffsetPtr));
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
attr_iterator_range attributes() const
std::optional< size_t > getFixedAttributesByteSize(const DWARFUnit &U) const
bool extractFast(const DWARFUnit &U, uint64_t *OffsetPtr, const DWARFDataExtractor &DebugInfoData, uint64_t UEndOffset, uint32_t ParentIdx)
Extracts a debug info entry, which is a child of a given unit, starting at a given offset.
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.