delete Children[i];
}
-/// Climb up the parent chain to get the compile unit DIE to which this DIE
-/// belongs.
-DIE *DIE::getCompileUnit() {
- DIE *p = this;
- while (p) {
- if (p->getTag() == dwarf::DW_TAG_compile_unit)
- return p;
- p = p->getParent();
- }
- llvm_unreachable("We should not have orphaned DIEs.");
-}
-
DIEValue *DIE::findAttribute(uint16_t Attribute) {
const SmallVectorImpl<DIEValue *> &Values = getValues();
const DIEAbbrev &Abbrevs = getAbbrev();
/// EmitValue - Emit label value.
///
void DIELabel::EmitValue(AsmPrinter *AP, uint16_t Form) const {
- AP->EmitLabelReference(Label, SizeOf(AP, Form));
+ AP->EmitLabelReference(Label, SizeOf(AP, Form), Form == dwarf::DW_FORM_strp
+ || Form == dwarf::DW_FORM_sec_offset || Form == dwarf::DW_OP_call_ref
+ || Form == dwarf::DW_FORM_ref_addr);
}
/// SizeOf - Determine size of label value in bytes.