mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
22 lines
398 B
C++
22 lines
398 B
C++
// Copyright 2024 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include "Common/CommonFuncs.h"
|
|
|
|
namespace Common
|
|
{
|
|
// TODO C++23: Replace with std::unreachable.
|
|
[[noreturn]] inline void Unreachable()
|
|
{
|
|
#ifdef _DEBUG
|
|
Crash();
|
|
#elif defined(_MSC_VER) && !defined(__clang__)
|
|
__assume(false);
|
|
#else
|
|
__builtin_unreachable();
|
|
#endif
|
|
}
|
|
} // namespace Common
|