diff options
-rw-r--r-- | src/wasm/wasm-type.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp index 772f256b7..f46d90854 100644 --- a/src/wasm/wasm-type.cpp +++ b/src/wasm/wasm-type.cpp @@ -206,9 +206,21 @@ Type markTemp(Type type) { return type; } -bool isTemp(Type type) { return !type.isBasic() && getTypeInfo(type)->isTemp; } +bool isTemp(Type type) { + // Avoid compiler warnings on this function not being used, as it is only used + // in assertions, which might be off. + bool (*func)(Type) = isTemp; + WASM_UNUSED(func); + + return !type.isBasic() && getTypeInfo(type)->isTemp; +} bool isTemp(HeapType type) { + // Avoid compiler warnings on this function not being used, as it is only used + // in assertions, which might be off. + bool (*func)(HeapType) = isTemp; + WASM_UNUSED(func); + return !type.isBasic() && getHeapTypeInfo(type)->isTemp; } |