diff options
| author | Julian Blake Kongslie | 2022-07-02 13:45:09 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-07-02 13:45:09 -0700 |
| commit | c72951a36d6cb9775dc1ecd9bc26bc13e796f10c (patch) | |
| tree | 5a8fe196beba5c7c674d1b3d627c9a0beac849f5 /util/assert.cpp | |
| parent | Trivial code reorg. (diff) | |
| download | issim-c72951a36d6cb9775dc1ecd9bc26bc13e796f10c.tar.xz | |
Dropping the async interface, and adding some real uarch.
Diffstat (limited to '')
| -rw-r--r-- | util/assert.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/util/assert.cpp b/util/assert.cpp new file mode 100644 index 0000000..5b57d67 --- /dev/null +++ b/util/assert.cpp | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #include <exception> | ||
| 2 | #include <iostream> | ||
| 3 | |||
| 4 | #include "util/assert.h" | ||
| 5 | |||
| 6 | void ASSERT(bool cond, const char *msg) | ||
| 7 | { | ||
| 8 | if (cond) | ||
| 9 | return; | ||
| 10 | std::cout << "Assertion failed: " << msg << "\n"; | ||
| 11 | std::terminate(); | ||
| 12 | } | ||
