Skip to content

Commit

Permalink
chore: Remove item_stack from DISanitizer
Browse files Browse the repository at this point in the history
It isn't being used anywhere (aside from `push` and immediate `pop`) and
has no impact on the visitor algorithm.
  • Loading branch information
vadorovsky committed Sep 9, 2024
1 parent 28724af commit 3f71bed
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/llvm/di.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub struct DISanitizer {
module: LLVMModuleRef,
builder: LLVMDIBuilderRef,
visited_nodes: HashSet<u64>,
item_stack: Vec<Item>,
replace_operands: HashMap<u64, LLVMMetadataRef>,
skipped_types: Vec<String>,
}
Expand Down Expand Up @@ -66,7 +65,6 @@ impl DISanitizer {
module,
builder: unsafe { LLVMCreateDIBuilder(module) },
visited_nodes: HashSet::new(),
item_stack: Vec::new(),
replace_operands: HashMap::new(),
skipped_types: Vec::new(),
}
Expand Down Expand Up @@ -249,8 +247,6 @@ impl DISanitizer {
return;
}

self.item_stack.push(item.clone());

if let Value::MDNode(mdnode) = value.clone() {
self.visit_mdnode(mdnode)
}
Expand Down Expand Up @@ -285,8 +281,6 @@ impl DISanitizer {
}
}
}

let _ = self.item_stack.pop().unwrap();
}

pub fn run(mut self, exported_symbols: &HashSet<Cow<'static, str>>) {
Expand Down

0 comments on commit 3f71bed

Please sign in to comment.