diff options
| author | Ralf Jung <post@ralfj.de> | 2024-03-17 10:29:02 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-03-23 18:45:05 +0100 |
| commit | 61775304200826b412f18fc87218161fb8a0dc5c (patch) | |
| tree | 43a2a658f42b2e50f03f8f09d1f970ebeef564a3 /compiler/rustc_codegen_ssa/src/mir | |
| parent | 987ef4c9221e792614a015a39b78f7d6a156c2f2 (diff) | |
refactor check_{lang,library}_ub: use a single intrinsic, put policy into library
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/mir')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/rvalue.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs index 15f2e0e56d8..0e8c4abf212 100644 --- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs +++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs @@ -680,8 +680,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { let val = layout.offset_of_subfield(bx.cx(), fields.iter()).bytes(); bx.cx().const_usize(val) } - mir::NullOp::UbCheck(_) => { - // In codegen, we want to check for language UB and library UB + mir::NullOp::UbChecks => { let val = bx.tcx().sess.opts.debug_assertions; bx.cx().const_bool(val) } |
