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
|
@ -789,7 +789,7 @@ fn codegen_stmt<'tcx>(
|
|||
layout.offset_of_subfield(fx, fields.iter()).bytes()
|
||||
}
|
||||
NullOp::UbChecks => {
|
||||
let val = fx.tcx.sess.opts.debug_assertions;
|
||||
let val = fx.tcx.sess.ub_checks();
|
||||
let val = CValue::by_val(
|
||||
fx.bcx.ins().iconst(types::I8, i64::try_from(val).unwrap()),
|
||||
fx.layout_of(fx.tcx.types.bool),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue