We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a28b986 commit 0335dc1Copy full SHA for 0335dc1
src/driver/mod.rs
@@ -73,12 +73,14 @@ impl Drop for TimingGuard {
73
74
impl cranelift_codegen::timing::Profiler for MeasuremeProfiler {
75
fn start_pass(&self, pass: cranelift_codegen::timing::Pass) -> Box<dyn std::any::Any> {
76
- let mut timing_guard =
77
- TimingGuard { profiler: std::mem::ManuallyDrop::new(self.0.clone()), inner: None };
+ let mut timing_guard = Box::new(TimingGuard {
+ profiler: std::mem::ManuallyDrop::new(self.0.clone()),
78
+ inner: None,
79
+ });
80
timing_guard.inner = Some(
81
unsafe { &*(&*timing_guard.profiler as &SelfProfilerRef as *const SelfProfilerRef) }
82
.generic_activity(pass.description()),
83
);
- Box::new(timing_guard)
84
+ timing_guard
85
}
86
0 commit comments