diff options
| author | Ben Kimock <kimockb@gmail.com> | 2024-04-03 08:54:03 -0400 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2024-04-06 11:21:47 -0400 |
| commit | a7912cb421db4f4039048cdba2b7fc98ae295342 (patch) | |
| tree | b221c94d64c7fd610f3937d2973fb503ef3d242e /compiler/rustc_codegen_cranelift/src | |
| parent | 83d0a940c65e9c276308c81107b9b21cf399cbc6 (diff) | |
| download | rust-a7912cb421db4f4039048cdba2b7fc98ae295342.tar.gz rust-a7912cb421db4f4039048cdba2b7fc98ae295342.zip | |
Put checks that detect UB under their own flag below debug_assertions
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/base.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs index 0aa2bae8f78..1307a62a60d 100644 --- a/compiler/rustc_codegen_cranelift/src/base.rs +++ b/compiler/rustc_codegen_cranelift/src/base.rs @@ -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), |
