/// The debug info/types section byte size of the data for this attribute.
uint32_t ByteSize = 0;
/// The attribute enumeration of this attribute.
- dwarf::Attribute Attr;
+ dwarf::Attribute Attr = dwarf::Attribute(0);
/// The form and value for this attribute.
DWARFFormValue Value;
- DWARFAttribute(uint32_t O, dwarf::Attribute A = dwarf::Attribute(0),
- dwarf::Form F = dwarf::Form(0)) : Attr(A), Value(F) {}
-
bool isValid() const {
return Offset != 0 && Attr != dwarf::Attribute(0);
}
/// Identifies DWARF attributes that may contain a reference to a
/// DWARF expression.
static bool mayHaveLocationDescription(dwarf::Attribute Attr);
-
- void clear() {
- Offset = 0;
- ByteSize = 0;
- Attr = dwarf::Attribute(0);
- Value = DWARFFormValue();
- }
};
} // end namespace llvm
}
DWARFDie::attribute_iterator::attribute_iterator(DWARFDie D, bool End)
- : Die(D), AttrValue(0), Index(0) {
+ : Die(D), Index(0) {
auto AbbrDecl = Die.getAbbreviationDeclarationPtr();
assert(AbbrDecl && "Must have abbreviation declaration");
if (End) {
AttrValue.ByteSize = ParseOffset - AttrValue.Offset;
} else {
assert(Index == NumAttrs && "Indexes should be [0, NumAttrs) only");
- AttrValue.clear();
+ AttrValue = {};
}
}