From 6b13be8bd7c5bbd04220da90304d48a0a3d8dcb1 Mon Sep 17 00:00:00 2001 From: ivan-aksamentov Date: Sun, 3 Nov 2024 14:57:50 +0100 Subject: [PATCH] fix: split ifndef for CHECK and CHECK_MSG --- flang/include/flang/Common/idioms.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flang/include/flang/Common/idioms.h b/flang/include/flang/Common/idioms.h index 99f383ec75b99..06631bcf2e445 100644 --- a/flang/include/flang/Common/idioms.h +++ b/flang/include/flang/Common/idioms.h @@ -87,7 +87,10 @@ template visitors(LAMBDAS... x) -> visitors; // To disable, compile with '-DCHECK=(void)' #ifndef CHECK #define CHECK(x) ((x) || (DIE("CHECK(" #x ") failed"), false)) +#endif + // Same as above, but with a custom error message. +#ifndef CHECK_MSG #define CHECK_MSG(x, y) ((x) || (DIE("CHECK(" #x ") failed: " #y), false)) #endif