diff options
author | Yury Delendik <ydelendik@mozilla.com> | 2016-05-26 19:26:36 -0500 |
---|---|---|
committer | Yury Delendik <ydelendik@mozilla.com> | 2016-05-26 19:26:36 -0500 |
commit | 1963afd6894c1f408b65a0f893e009b4e9f36e55 (patch) | |
tree | 6786ce4db4c21ef478a8edc415af29f94053b6c1 /src/compiler-support.h | |
parent | 45618ddc8eee4f288a2d11d1afe763dbdeab8559 (diff) | |
download | binaryen-1963afd6894c1f408b65a0f893e009b4e9f36e55.tar.gz binaryen-1963afd6894c1f408b65a0f893e009b4e9f36e55.tar.bz2 binaryen-1963afd6894c1f408b65a0f893e009b4e9f36e55.zip |
Allows parsing of debug information in .S files
Currently it ignores this information. Also it allows parse files with -asm-verbose=true.
Diffstat (limited to 'src/compiler-support.h')
-rw-r--r-- | src/compiler-support.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler-support.h b/src/compiler-support.h index 9e298b278..bf2885993 100644 --- a/src/compiler-support.h +++ b/src/compiler-support.h @@ -36,4 +36,10 @@ # define WASM_UNREACHABLE() abort() #endif +// The code might contain TODOs or stubs that read some values but do nothing +// with them. The compiler might fail with [-Werror,-Wunused-variable]. +// The WASM_UNUSED(varible) is a wrapper that helps to suppress the error. +#define WASM_UNUSED(expr) \ + do { if (sizeof expr) { (void)0; } } while (0) + #endif // wasm_compiler_support_h |