summaryrefslogtreecommitdiffstats
path: root/util/system/yassert.h
diff options
context:
space:
mode:
authorsomov <[email protected]>2022-02-10 16:45:47 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:47 +0300
commita5950576e397b1909261050b8c7da16db58f10b1 (patch)
tree7ba7677f6a4c3e19e2cefab34d16df2c8963b4d4 /util/system/yassert.h
parent81eddc8c0b55990194e112b02d127b87d54164a9 (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/system/yassert.h')
-rw-r--r--util/system/yassert.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/util/system/yassert.h b/util/system/yassert.h
index 529823440cb..bdd0f7b1503 100644
--- a/util/system/yassert.h
+++ b/util/system/yassert.h
@@ -22,10 +22,10 @@
#include <cassert>
#endif
-#if !defined(_MSC_VER)
- #if defined(__has_builtin) && __has_builtin(__debugbreak)
+#if !defined(_MSC_VER)
+ #if defined(__has_builtin) && __has_builtin(__debugbreak)
// Do nothing, use __debugbreak builtin
- #else
+ #else
inline void __debugbreak() {
#if defined(__x86_64__) || defined(__i386__)
__asm__ volatile("int $3\n");
@@ -33,27 +33,27 @@ inline void __debugbreak() {
assert(0);
#endif
}
- #endif
-
+ #endif
+
inline bool YaIsDebuggerPresent() {
return false;
}
#else
// __debugbreak is intrinsic in MSVC
-
+
extern "C" {
__declspec(dllimport) int __stdcall IsDebuggerPresent();
}
-
+
inline bool YaIsDebuggerPresent() {
return IsDebuggerPresent() != 0;
}
-#endif
-
-inline void YaDebugBreak() {
- __debugbreak();
+#endif
+
+inline void YaDebugBreak() {
+ __debugbreak();
}
-
+
#undef Y_ASSERT
#if !defined(NDEBUG) && !defined(__GCCXML__)