Add back cache invalidation to basic_blocks_and_local_decls_mut

This commit is contained in:
Paul Daniel Faria 2019-10-04 11:46:01 -04:00
parent 52cc85f008
commit 22bc8a01c1

View file

@ -203,7 +203,7 @@ impl<'tcx> Body<'tcx> {
#[inline]
pub fn basic_blocks_mut(&mut self) -> &mut IndexVec<BasicBlock, BasicBlockData<'tcx>> {
debug!("Clearing predecessors cache at: {:?}", self.span.data());
debug!("bbm: Clearing predecessors cache for body at: {:?}", self.span.data());
self.predecessors_cache = None;
&mut self.basic_blocks
}
@ -212,6 +212,8 @@ impl<'tcx> Body<'tcx> {
pub fn basic_blocks_and_local_decls_mut(
&mut self,
) -> (&mut IndexVec<BasicBlock, BasicBlockData<'tcx>>, &mut LocalDecls<'tcx>) {
debug!("bbaldm: Clearing predecessors cache for body at: {:?}", self.span.data());
self.predecessors_cache = None;
(&mut self.basic_blocks, &mut self.local_decls)
}