Implement black_box using intrinsic

The new implementation allows some `memcpy`s to be optimized away,
so the uninit value in ui/sanitize/memory.rs is constructed directly
onto the return place. Therefore the sanitizer now says that the
value is allocated by `main` rather than `random`.
This commit is contained in:
Gary Guo 2021-08-10 11:50:33 +01:00
parent ae90dcf020
commit 1fb1643129
9 changed files with 52 additions and 15 deletions

View file

@ -425,7 +425,7 @@ impl AsmMethods for CodegenCx<'ll, 'tcx> {
}
}
fn inline_asm_call(
pub(crate) fn inline_asm_call(
bx: &mut Builder<'a, 'll, 'tcx>,
asm: &str,
cons: &str,