diff options
author | Ben Gamari <ben@well-typed.com> | 2020-11-23 17:54:46 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-11-26 16:00:34 -0500 |
commit | 86a59d930fa6ab0889792c1d67b1d29ba1edec1f (patch) | |
tree | f600cdf6cfca89d5ecd6e845ba07b8cde0de2c7b /includes | |
parent | a9378e690d79ea5fce18aad96c76c8eb34f2ebba (diff) | |
download | haskell-86a59d930fa6ab0889792c1d67b1d29ba1edec1f.tar.gz |
rts: Use RTS_LIKELY in CHECK
Most compilers probably already infer that
`barf` diverges but it nevertheless doesn't
hurt to be explicit.
Diffstat (limited to 'includes')
-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 027d5173a1..fc69a964e3 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -119,13 +119,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__) |