Ignore non-existent refs in the transformed DWARF
This commit is contained in:
committed by
Dan Gohman
parent
c0ba4753eb
commit
19cfec6e8f
@@ -568,8 +568,11 @@ where
|
|||||||
}
|
}
|
||||||
for (die_id, attr_name, offset) in pending_die_refs {
|
for (die_id, attr_name, offset) in pending_die_refs {
|
||||||
let die = comp_unit.get_mut(die_id);
|
let die = comp_unit.get_mut(die_id);
|
||||||
let unit_id = die_ref_map[&offset];
|
// TODO we probably loosing DW_AT_abstract_origin and DW_AT_type references
|
||||||
die.set(attr_name, write::AttributeValue::ThisUnitEntryRef(unit_id));
|
// here, find out if we drop stuff we don't need to.
|
||||||
|
if let Some(unit_id) = die_ref_map.get(&offset) {
|
||||||
|
die.set(attr_name, write::AttributeValue::ThisUnitEntryRef(*unit_id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user