From a7d93c939a9cedbc239b3ce647fb8a22125a4d22 Mon Sep 17 00:00:00 2001 From: Richard Diamond Date: Sat, 24 Oct 2015 20:51:34 -0500 Subject: Port the standard crates to PNaCl/NaCl. --- src/libtest/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libtest') diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index cfe75779536..12541dc010b 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -1084,12 +1084,16 @@ impl MetricMap { /// elimination. /// /// This function is a no-op, and does not even read from `dummy`. +#[cfg(not(all(target_os = "nacl", target_arch = "le32")))] pub fn black_box(dummy: T) -> T { // we need to "use" the argument in some way LLVM can't // introspect. unsafe {asm!("" : : "r"(&dummy))} dummy } +#[cfg(all(target_os = "nacl", target_arch = "le32"))] +#[inline(never)] +pub fn black_box(dummy: T) -> T { dummy } impl Bencher { -- cgit 1.4.1-3-g733a5