Put checks that detect UB under their own flag below debug_assertions

This commit is contained in:
Ben Kimock
2024-04-03 08:54:03 -04:00
parent 83d0a940c6
commit a7912cb421
42 changed files with 206 additions and 64 deletions

View File

@@ -16,7 +16,7 @@ impl<'tcx> MirPass<'tcx> for CheckAlignment {
if sess.target.llvm_target == "i686-pc-windows-msvc" {
return false;
}
sess.opts.debug_assertions
sess.ub_checks()
}
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {