Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove nacl from libtest
  • Loading branch information
est31 committed Oct 5, 2017
1 parent aad1c99 commit 329b901
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libtest/lib.rs
Expand Up @@ -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
Expand Down

0 comments on commit 329b901

Please sign in to comment.