diff options
| author | Richard Diamond <wichard@vitalitystudios.com> | 2015-10-24 20:51:34 -0500 |
|---|---|---|
| committer | Richard Diamond <wichard@vitalitystudios.com> | 2015-10-28 17:23:28 -0500 |
| commit | a7d93c939a9cedbc239b3ce647fb8a22125a4d22 (patch) | |
| tree | c21ab99f1eb5dc33d46121bb5912dc691e73530d /src/libtest/lib.rs | |
| parent | 8d86d1a4e17239361ecebced0d5dd246efa95512 (diff) | |
| download | rust-a7d93c939a9cedbc239b3ce647fb8a22125a4d22.tar.gz rust-a7d93c939a9cedbc239b3ce647fb8a22125a4d22.zip | |
Port the standard crates to PNaCl/NaCl.
Diffstat (limited to 'src/libtest/lib.rs')
| -rw-r--r-- | src/libtest/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<T>(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<T>(dummy: T) -> T { dummy } impl Bencher { |
