diff options
author | somov <[email protected]> | 2022-02-10 16:45:49 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:49 +0300 |
commit | 7489e4682331202b9c7d863c0898eb83d7b12c2b (patch) | |
tree | 9142afc54d335ea52910662635b898e79e192e49 /util/system/yassert.h | |
parent | a5950576e397b1909261050b8c7da16db58f10b1 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/system/yassert.h')
-rw-r--r-- | util/system/yassert.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/util/system/yassert.h b/util/system/yassert.h index bdd0f7b1503..529823440cb 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__) |