aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2013-09-24 21:01:04 +0700
committerBruce Mitchener <bruce.mitchener@gmail.com>2013-09-24 21:01:04 +0700
commitbaa4d38f13f436bdeba724f0825bbe985637be22 (patch)
tree43543261bb5485b1c109e0e9f93dcb2f7bcd227d /system
parent4db5a7e8f78708a3a73c325804d1ca6238351699 (diff)
Mark __assert_fail as _Noreturn.
This eliminates a performance regression caused in the box2d benchmark by switching to the musl headers. Without this being _Noreturn, clang / llvm generates much worse code involving phis and extra loads.
Diffstat (limited to 'system')
-rw-r--r--system/include/libc/assert.h2
-rw-r--r--system/lib/libc/musl/readme.txt1
2 files changed, 2 insertions, 1 deletions
diff --git a/system/include/libc/assert.h b/system/include/libc/assert.h
index ab745db1..c64d3e52 100644
--- a/system/include/libc/assert.h
+++ b/system/include/libc/assert.h
@@ -12,7 +12,7 @@
extern "C" {
#endif
-void __assert_fail (const char *, const char *, int, const char *);
+_Noreturn void __assert_fail (const char *, const char *, int, const char *);
#ifdef __cplusplus
}
diff --git a/system/lib/libc/musl/readme.txt b/system/lib/libc/musl/readme.txt
index 16c58423..9ca04036 100644
--- a/system/lib/libc/musl/readme.txt
+++ b/system/lib/libc/musl/readme.txt
@@ -6,3 +6,4 @@ Differences from upstream musl include:
* various 64 bit types are 32 bit instead including off_t,
ino_t, dev_t, blkcnt_t, fsblkcnt_t, fsfilcnt_t, rlim_t.
* We don't define _POSIX_SHARED_MEMORY_OBJECTS.
+* We flag __assert_fail as _Noreturn.