diff options
author | Sam Clegg <sbc@chromium.org> | 2017-06-12 14:43:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-12 14:43:54 -0700 |
commit | ec76c8c1d7bf28e025770eb3a84d5ee6c7040d82 (patch) | |
tree | 51f245a2852d7d8c58076f8e1db59befe7e849db /src/compiler-support.h | |
parent | 3b81197bd37484a43921076f6592950734d4f3f4 (diff) | |
download | binaryen-ec76c8c1d7bf28e025770eb3a84d5ee6c7040d82.tar.gz binaryen-ec76c8c1d7bf28e025770eb3a84d5ee6c7040d82.tar.bz2 binaryen-ec76c8c1d7bf28e025770eb3a84d5ee6c7040d82.zip |
Log callImport fatal error to cerr so it is not buffered. (#1036)
Use Fatal() rather than stdout or report callImport error
Without this the write to stdout can be lost (Since the following line
aborts)
Diffstat (limited to 'src/compiler-support.h')
-rw-r--r-- | src/compiler-support.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler-support.h b/src/compiler-support.h index bf2885993..3dd873383 100644 --- a/src/compiler-support.h +++ b/src/compiler-support.h @@ -36,6 +36,14 @@ # define WASM_UNREACHABLE() abort() #endif +#ifdef __GNUC__ +#define WASM_NORETURN __attribute__((noreturn)) +#elif defined(_MSC_VER) +#define WASM_NORETURN __declspec(noreturn) +#else +#define WASM_NORETURN +#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. |