Skip to content

Commit f87c833

Browse files
committed
Implement the intrinsic in Miri
1 parent 0fdbf3c commit f87c833

File tree

1 file changed

+5
-0
lines changed
  • src/tools/miri/src/shims/intrinsics

1 file changed

+5
-0
lines changed

src/tools/miri/src/shims/intrinsics/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
425425
throw_machine_stop!(TerminationInfo::Abort(format!("trace/breakpoint trap")))
426426
}
427427

428+
"debug_assertions" => {
429+
let [] = check_arg_count(args)?;
430+
this.write_scalar(Scalar::from_bool(this.tcx.sess.opts.debug_assertions), dest)?;
431+
}
432+
428433
name => throw_unsup_format!("unimplemented intrinsic: `{name}`"),
429434
}
430435

0 commit comments

Comments
 (0)