mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 12:55:31 +08:00
A failed BLACK_VERIFY will generate a Crashpad crash report.
Using noinline to make sure the call to failedVerify is visible in the stack trace.
This commit is contained in:
@@ -14,6 +14,14 @@
|
||||
|
||||
#include "blackmisc/blackmiscexport.h"
|
||||
|
||||
//! \cond
|
||||
#ifdef Q_CC_MSVC
|
||||
#define BLACK_NO_INLINE __declspec(noinline)
|
||||
#else
|
||||
#define BLACK_NO_INLINE __attribute__((noinline))
|
||||
#endif
|
||||
//! \endcond
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Private
|
||||
@@ -22,7 +30,7 @@ namespace BlackMisc
|
||||
inline void noop() {}
|
||||
|
||||
//! \private Called by BLACK_VERIFY when the condition is false.
|
||||
BLACKMISC_EXPORT void failedVerify(const char *condition, const char *filename, int line, const char *context = nullptr, const char *message = nullptr);
|
||||
BLACKMISC_EXPORT BLACK_NO_INLINE void failedVerify(const char *condition, const char *filename, int line, const char *context = nullptr, const char *message = nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user