diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-10-28 22:21:23 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-20 15:35:58 +0100 |
commit | 9337d8bc3cde964ba804274fd6d09173c416614f (patch) | |
tree | b30d25c20eab06175339fefee4eda0bbd6706d9c /asl/assert.hpp | |
parent | 4a3185b782dabeb664fcf2fa4f6d17e36cf23d0e (diff) |
Some more work on cross-platform configuration
Diffstat (limited to 'asl/assert.hpp')
-rw-r--r-- | asl/assert.hpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/asl/assert.hpp b/asl/assert.hpp index d419c24..2322a5b 100644 --- a/asl/assert.hpp +++ b/asl/assert.hpp @@ -1,6 +1,13 @@ #pragma once
-// @Todo Make this portable-ish
+#include "asl/config.hpp"
+
+#if ASL_COMPILER_CLANG_CL
+ #define ASL_DEBUG_BREAK() __debugbreak()
+#elif ASL_COMPILER_CLANG
+ #define ASL_DEBUG_BREAK() __builtin_debug_trap()
+#endif
+
#define ASL_ASSERT(...) \
if (__VA_ARGS__) {} \
- else { __builtin_debugtrap(); }
+ else { ASL_DEBUG_BREAK(); }
|