Put checks that detect UB under their own flag below debug_assertions
This commit is contained in:
parent
83d0a940c6
commit
a7912cb421
42 changed files with 206 additions and 64 deletions
|
@ -682,7 +682,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
bx.cx().const_usize(val)
|
||||
}
|
||||
mir::NullOp::UbChecks => {
|
||||
let val = bx.tcx().sess.opts.debug_assertions;
|
||||
let val = bx.tcx().sess.ub_checks();
|
||||
bx.cx().const_bool(val)
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue