summaryrefslogtreecommitdiff
path: root/asl/assert.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'asl/assert.hpp')
-rw-r--r--asl/assert.hpp11
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(); }