Rollup merge of #49625 - bjorn3:miri_access_memory_kind, r=oli-obk

miri: add public alloc_kind accessor
This commit is contained in:
kennytm
2018-04-05 02:05:02 +08:00
+4
View File
@@ -328,6 +328,10 @@ pub fn get_fn(&self, ptr: MemoryPointer) -> EvalResult<'tcx, Instance<'tcx>> {
.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]);