diff options
author | Tobias Nießen <tniessen@tnie.de> | 2018-05-20 18:05:25 +0300 |
---|---|---|
committer | Tobias Nießen <tniessen@tnie.de> | 2018-05-26 13:29:12 +0300 |
commit | 13493e99bfd208bc6e5381a918384049384cc2ed (patch) | |
tree | c544ab44d19bf906f1f09421cbe347396d365922 /src/util.h | |
parent | c700cc42da9cf73af9fec2098520a6c0a631d901 (diff) |
src: add CHECK_IMPLIES macro
This change introduces the CHECK_IMPLIES macro
similar to its definition in v8 and replaces instances of
CHECK with CHECK_IMPLIES where it seems appropriate.
PR-URL: https://github.com/nodejs/node/pull/20914
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index 1f43ba3f7b9..ff77ccc0b8c 100644 --- a/src/util.h +++ b/src/util.h @@ -129,6 +129,7 @@ void DumpBacktrace(FILE* fp); #define CHECK_LE(a, b) CHECK((a) <= (b)) #define CHECK_LT(a, b) CHECK((a) < (b)) #define CHECK_NE(a, b) CHECK((a) != (b)) +#define CHECK_IMPLIES(a, b) CHECK(!(a) || (b)) #define UNREACHABLE() ABORT() |