Remove nacl from libtest

This commit is contained in:
est31 2017-10-05 05:04:40 +02:00
parent aad1c998c7
commit 329b901b50

View File

@ -1554,16 +1554,14 @@ impl MetricMap {
/// elimination.
///
/// This function is a no-op, and does not even read from `dummy`.
#[cfg(not(any(all(target_os = "nacl", target_arch = "le32"),
target_arch = "asmjs", target_arch = "wasm32")))]
#[cfg(not(any(target_arch = "asmjs", target_arch = "wasm32")))]
pub fn black_box<T>(dummy: T) -> T {
// we need to "use" the argument in some way LLVM can't
// introspect.
unsafe { asm!("" : : "r"(&dummy)) }
dummy
}
#[cfg(any(all(target_os = "nacl", target_arch = "le32"),
target_arch = "asmjs", target_arch = "wasm32"))]
#[cfg(any(target_arch = "asmjs", target_arch = "wasm32"))]
#[inline(never)]
pub fn black_box<T>(dummy: T) -> T {
dummy