Skip to content

Commit 4abdcd7

Browse files
committed
provenance_gc: fix comment
1 parent c74ffd8 commit 4abdcd7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/miri/src/provenance_gc.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ impl LiveAllocs<'_, '_> {
187187
impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {}
188188
pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
189189
fn run_provenance_gc(&mut self) {
190-
// We collect all tags from various parts of the interpreter, but also
191190
let this = self.eval_context_mut();
192191

192+
// We collect all tags and AllocId from every part of the interpreter.
193193
let mut tags = FxHashSet::default();
194194
let mut alloc_ids = FxHashSet::default();
195195
this.visit_provenance(&mut |id, tag| {
@@ -200,6 +200,8 @@ pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
200200
tags.insert(tag);
201201
}
202202
});
203+
204+
// Based on this, clean up the interpreter state.
203205
self.remove_unreachable_tags(tags);
204206
self.remove_unreachable_allocs(alloc_ids);
205207
}

0 commit comments

Comments
 (0)