Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Cranelift: Fix unused warning on some builds (#13757)

Nick Fitzgerald4f361ff8a627
diff --git a/cranelift/codegen/src/machinst/lower.rs b/cranelift/codegen/src/machinst/lower.rs
index 0a09edc5c3..0ca0064314 100644
--- a/cranelift/codegen/src/machinst/lower.rs
+++ b/cranelift/codegen/src/machinst/lower.rs
@@ -1623,6 +1623,13 @@ impl<'func, I: VCodeInst> Lower<'func, I> {
}
/// Increment the reference count for the Value, ensuring that it gets lowered.
+ #[cfg(any(
+ feature = "x86",
+ feature = "arm64",
+ feature = "riscv64",
+ feature = "s390x",
+ feature = "pulley"
+ ))]
pub fn increment_lowered_uses(&mut self, val: Value) {
self.value_lowered_uses[val] += 1
}