// Copyright 2022 The Emscripten Authors. All rights reserved.1// Emscripten is available under two separate licenses, the MIT license and the2// University of Illinois/NCSA Open Source License. Both these licenses can be3// found in the LICENSE file.45#pragma once67#include <cstdlib>89#ifndef NDEBUG10// In debug builds show a message.11namespace wasmfs {12[[noreturn]] void13handle_unreachable(const char* msg, const char* file, unsigned line);14}15#define WASMFS_UNREACHABLE(msg) \16wasmfs::handle_unreachable(msg, __FILE__, __LINE__)17#else18// In release builds trap in a compact manner.19#define WASMFS_UNREACHABLE(msg) __builtin_trap()20#endif212223