6#include <QLoggingCategory>
12#ifdef SWIFT_USE_CRASHPAD
13# include "crashpad/client/simulate_crash.h"
23# if __has_builtin(__builtin_debugtrap)
24# define SWIFT_BUILTIN_DEBUGTRAP __builtin_debugtrap
25# elif __has_builtin(__builtin_debugger)
26# define SWIFT_BUILTIN_DEBUGTRAP __builtin_debugger
31namespace swift::misc::private_ns
34 void failedVerify(
const char *condition,
const char *filename,
int line,
const char *context,
const char *message,
46 if (!audit || IsDebuggerPresent())
51# elif defined(SWIFT_BUILTIN_DEBUGTRAP)
52 SWIFT_BUILTIN_DEBUGTRAP();
53# elif defined(Q_PROCESSOR_X86)
54 __asm__
volatile(
"int $0x03");
55# elif defined(Q_PROCESSOR_ARM)
56 __asm__
volatile(
".inst 0xe7f001f0");
57# elif defined(Q_OS_UNIX)
64#if defined(QT_NO_DEBUG) || defined(Q_CC_MSVC)
66 if (context && message)
68 log = QStringLiteral(
"Failed to verify: %1 (%2 in %3) in %4 line %5")
73 log = QStringLiteral(
"Failed to verify: %1 in %2 line %3").
arg(condition, filename,
QString::number(line));
76# if defined(SWIFT_USE_CRASHPAD)
77 CRASHPAD_SIMULATE_CRASH();
static const QString & verification()
Verification.
QString arg(Args &&... args) const const
QString number(double n, char format, int precision)