Rollup merge of #87916 - nbdd0121:black_box, r=nagisa
Implement `black_box` using intrinsic Introduce `black_box` intrinsic, as suggested in https://github.com/rust-lang/rust/pull/87590#discussion_r680468700. This is still codegenned as empty inline assembly for LLVM. For MIR interpretation and cranelift it's treated as identity. cc `@Amanieu` as this is related to inline assembly cc `@bjorn3` for rustc_codegen_cranelift changes cc `@RalfJung` as this affects MIRI r? `@nagisa` I suppose
This commit is contained in:
commit
df23264f80
9 changed files with 52 additions and 15 deletions
|
|
@ -6,7 +6,7 @@
|
|||
// run-fail
|
||||
// error-pattern: MemorySanitizer: use-of-uninitialized-value
|
||||
// error-pattern: Uninitialized value was created by an allocation
|
||||
// error-pattern: in the stack frame of function 'random'
|
||||
// error-pattern: in the stack frame of function 'main'
|
||||
//
|
||||
// This test case intentionally limits the usage of the std,
|
||||
// since it will be linked with an uninstrumented version of it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue