Handle operand temps for function calls

This allows temporary destinations for function calls to have their
allocas omitted.
This commit is contained in:
James Miller 2016-04-04 19:21:27 +12:00
parent 9c2186d4d7
commit e4d4fa3295
5 changed files with 191 additions and 45 deletions

View file

@ -45,8 +45,9 @@ impl fmt::Debug for CodeExtent {
ty::tls::with_opt(|opt_tcx| {
if let Some(tcx) = opt_tcx {
let data = tcx.region_maps.code_extents.borrow()[self.0 as usize];
write!(f, "/{:?}", data)?;
if let Some(data) = tcx.region_maps.code_extents.borrow().get(self.0 as usize) {
write!(f, "/{:?}", data)?;
}
}
Ok(())
})?;