logvisor: Mark logvisorAbort as [[noreturn]]

All variants of logvisorAbort do what they say in their name -- abort.
Given control isn't returned from this function, we can signify that
it's a noreturn function
This commit is contained in:
Lioncash 2019-09-06 07:37:22 -04:00
parent f623ace3b4
commit 63cb911d09
2 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ extern "C" void logvisorBp();
namespace logvisor {
void logvisorAbort();
[[noreturn]] void logvisorAbort();
#if _WIN32 && UNICODE
#define LOG_UCS2 1

View File

@ -116,7 +116,7 @@ void KillProcessTree() {
}
}
void logvisorAbort() {
[[noreturn]] void logvisorAbort() {
#if !WINDOWS_STORE
unsigned int i;
void* stack[100];
@ -167,13 +167,13 @@ void logvisorAbort() {
}
#elif defined(__SWITCH__)
void logvisorAbort() { exit(1); }
[[noreturn]] void logvisorAbort() { exit(1); }
#else
void KillProcessTree() {}
#include <execinfo.h>
void logvisorAbort() {
[[noreturn]] void logvisorAbort() {
void* array[128];
size_t size = backtrace(array, 128);