diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/support/utilities.h | 18 | ||||
-rw-r--r-- | src/wasm-linker.h | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/support/utilities.h b/src/support/utilities.h index d8ca23463..3ff1f9c5e 100644 --- a/src/support/utilities.h +++ b/src/support/utilities.h @@ -54,6 +54,24 @@ std::unique_ptr<T> make_unique(Args&&... args) return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); } +// For fatal errors which could arise from input (i.e. not assertion failures) +class Fatal { + public: + Fatal() { + std::cerr << "Fatal: "; + } + template<typename T> + Fatal &operator<<(T arg) { + std::cerr << arg; + return *this; + } + ~Fatal() { + std::cerr << "\n"; + exit(1); + } +}; + + } // namespace wasm #endif // wasm_support_utilities_h diff --git a/src/wasm-linker.h b/src/wasm-linker.h index b24056526..ceb948c4e 100644 --- a/src/wasm-linker.h +++ b/src/wasm-linker.h @@ -34,24 +34,6 @@ namespace wasm { cashew::IString EMSCRIPTEN_ASM_CONST("emscripten_asm_const"); -// For fatal errors which could arise from input (i.e. not assertion failures) -class Fatal { - public: - Fatal() { - std::cerr << "Fatal: "; - } - template<typename T> - Fatal &operator<<(T arg) { - std::cerr << arg; - return *this; - } - ~Fatal() { - std::cerr << "\n"; - exit(1); - } -}; - - // Wasm module linking/layout information class Linker { public: |