6 #include <QLoggingCategory>
12 #ifdef SWIFT_USE_CRASHPAD
13 # include "crashpad/client/simulate_crash.h"
16 #if defined(Q_CC_MSVC)
21 #if defined(Q_CC_CLANG)
22 # if __has_builtin(__builtin_debugtrap)
23 # define SWIFT_BUILTIN_DEBUGTRAP __builtin_debugtrap
24 # elif __has_builtin(__builtin_debugger)
25 # define SWIFT_BUILTIN_DEBUGTRAP __builtin_debugger
29 namespace swift::misc::private_ns
32 void failedVerify(
const char *condition,
const char *filename,
int line,
const char *context,
const char *message,
43 # if defined(Q_CC_MSVC)
44 if (!audit || IsDebuggerPresent())
49 # elif defined(SWIFT_BUILTIN_DEBUGTRAP)
50 SWIFT_BUILTIN_DEBUGTRAP();
51 # elif defined(Q_PROCESSOR_X86)
52 __asm__
volatile(
"int $0x03");
53 # elif defined(Q_PROCESSOR_ARM)
54 __asm__
volatile(
".inst 0xe7f001f0");
55 # elif defined(Q_OS_UNIX)
62 #if defined(QT_NO_DEBUG) || defined(Q_CC_MSVC)
64 if (context && message)
66 log = QStringLiteral(
"Failed to verify: %1 (%2 in %3) in %4 line %5")
67 .arg(condition, message, context, filename, QString::number(line));
71 log = QStringLiteral(
"Failed to verify: %1 in %2 line %3").arg(condition, filename, QString::number(line));
74 # if defined(SWIFT_USE_CRASHPAD)
75 CRASHPAD_SIMULATE_CRASH();
static const QString & verification()
Verification.