aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-09-22 21:18:27 -0400
committerGitHub <noreply@github.com>2019-09-22 21:18:27 -0400
commit35c1d8cefc3a77b867ecc2da999162781099b4c6 (patch)
tree572620e3af2d8254f74fdd7086eab1e851148084 /src/util.cpp
parent989cd4233e14d592c19d458fee24ff0fa9fd9638 (diff)
parent55925b6e259b5453b8af29a5365d82378cb1d54b (diff)
downloadzig-35c1d8cefc3a77b867ecc2da999162781099b4c6.tar.gz
zig-35c1d8cefc3a77b867ecc2da999162781099b4c6.zip
Merge pull request #3290 from ziglang/more-test-coverage
significantly increase test coverage
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 65b1fe3082..13bfbbcd47 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -18,17 +18,10 @@ void zig_panic(const char *format, ...) {
vfprintf(stderr, format, ap);
fflush(stderr);
va_end(ap);
- stage2_panic(nullptr, 0);
+ stage2_panic("", 0);
abort();
}
-void assert(bool ok) {
- if (!ok) {
- const char *msg = "Assertion failed. This is a bug in the Zig compiler.";
- stage2_panic(msg, strlen(msg));
- }
-}
-
uint32_t int_hash(int i) {
return (uint32_t)(i % UINT32_MAX);
}