diff options
author | Ben Gamari <ben@well-typed.com> | 2020-11-23 17:54:46 -0500 |
---|---|---|
committer | Ben Gamari <ben@well-typed.com> | 2020-11-23 17:54:46 -0500 |
commit | fb4382460df5c75e3252eb9b462bf537b481e651 (patch) | |
tree | 3ca1417790a9976ef717379d8b5d4e5b14391c5f | |
parent | 6815603f271484766425ff2e37043b78da2d073c (diff) | |
download | haskell-fb4382460df5c75e3252eb9b462bf537b481e651.tar.gz |
rts: Use RTS_LIKELY in CHECKwip/check-likelihood
Most compilers probably already infer that
`barf` diverges but it nevertheless doesn't
hurt to be explicit.
-rw-r--r-- | includes/Rts.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/Rts.h b/includes/Rts.h index 1e5a60262b..38d2c11642 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -114,13 +114,13 @@ void _assertFail(const char *filename, unsigned int linenum) GNUC3_ATTRIBUTE(__noreturn__); #define CHECK(predicate) \ - if (predicate) \ + if (RTS_LIKELY(predicate)) \ /*null*/; \ else \ _assertFail(__FILE__, __LINE__) #define CHECKM(predicate, msg, ...) \ - if (predicate) \ + if (RTS_LIKELY(predicate)) \ /*null*/; \ else \ barf(msg, ##__VA_ARGS__) |