summaryrefslogtreecommitdiff
path: root/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2023-08-23 18:08:23 -0400
committerKyleMiles <krm504@nyu.edu>2023-08-25 11:18:39 -0400
commitc618591f29b35017802fef7a5209fd3b9dbfac30 (patch)
tree1dfed643650b90c1c6c48abf4763101768883e85 /rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs
parentc0c145ff7286d99edbd4b367bca4e228cae1a3ac (diff)
DWARF Import : Fix crash on recursively defined function type that contains itself as a parameter
Diffstat (limited to 'rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs')
-rw-r--r--rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs b/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs
index d4a2794d..b088d527 100644
--- a/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs
+++ b/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs
@@ -176,6 +176,10 @@ impl DebugInfoBuilder {
}
}
+ pub fn remove_type(&mut self, type_uid: TypeUID) {
+ self.types.remove(&type_uid);
+ }
+
// TODO : Non-copy?
pub fn get_type(&self, type_uid: TypeUID) -> Option<(CString, Ref<Type>)> {
self.types