Rollup merge of #49625 - bjorn3:miri_access_memory_kind, r=oli-obk
miri: add public alloc_kind accessor
This commit is contained in:
commit
391959feb9
1 changed files with 4 additions and 0 deletions
|
|
@ -328,6 +328,10 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
|
|||
.ok_or(EvalErrorKind::ExecuteMemory.into())
|
||||
}
|
||||
|
||||
pub fn get_alloc_kind(&self, id: AllocId) -> Option<MemoryKind<M::MemoryKinds>> {
|
||||
self.alloc_kind.get(&id).cloned()
|
||||
}
|
||||
|
||||
/// For debugging, print an allocation and all allocations it points to, recursively.
|
||||
pub fn dump_alloc(&self, id: AllocId) {
|
||||
self.dump_allocs(vec![id]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue