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/support/utilities.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/support/utilities.h')
-rw-r--r-- | src/support/utilities.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/support/utilities.h b/src/support/utilities.h index 92e7c226f..66e7ed797 100644 --- a/src/support/utilities.h +++ b/src/support/utilities.h @@ -17,6 +17,8 @@ #ifndef wasm_support_utilities_h #define wasm_support_utilities_h +#include "compiler-support.h" + #include <cassert> #include <cstdint> #include <cstring> @@ -69,7 +71,7 @@ class Fatal { std::cerr << arg; return *this; } - ~Fatal() { + WASM_NORETURN ~Fatal() { std::cerr << "\n"; exit(1); } |