Profile MIR passes.
This commit is contained in:
parent
2913ad6db0
commit
addc72799a
4 changed files with 7 additions and 7 deletions
|
@ -101,7 +101,7 @@ impl<'tcx> HasLocalDecls<'tcx> for Body<'tcx> {
|
|||
/// pass will be named after the type, and it will consist of a main
|
||||
/// loop that goes over each available MIR and applies `run_pass`.
|
||||
pub trait MirPass<'tcx> {
|
||||
fn name(&self) -> &str {
|
||||
fn name(&self) -> &'static str {
|
||||
let name = std::any::type_name::<Self>();
|
||||
if let Some((_, tail)) = name.rsplit_once(':') { tail } else { name }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue