summaryrefslogtreecommitdiff
path: root/absl/log/internal/check_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/log/internal/check_impl.h')
-rw-r--r--absl/log/internal/check_impl.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/absl/log/internal/check_impl.h b/absl/log/internal/check_impl.h
index 301b2915..d3238861 100644
--- a/absl/log/internal/check_impl.h
+++ b/absl/log/internal/check_impl.h
@@ -22,22 +22,23 @@
#include "absl/log/internal/strip.h"
// CHECK
-#define ABSL_CHECK_IMPL(condition) \
+#define ABSL_CHECK_IMPL(condition, condition_str) \
ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, \
ABSL_PREDICT_FALSE(!(condition))) \
- ABSL_LOG_INTERNAL_CHECK(#condition).InternalStream()
+ ABSL_LOG_INTERNAL_CHECK(condition_str).InternalStream()
-#define ABSL_QCHECK_IMPL(condition) \
+#define ABSL_QCHECK_IMPL(condition, condition_str) \
ABSL_LOG_INTERNAL_CONDITION_QFATAL(STATELESS, \
ABSL_PREDICT_FALSE(!(condition))) \
- ABSL_LOG_INTERNAL_QCHECK(#condition).InternalStream()
+ ABSL_LOG_INTERNAL_QCHECK(condition_str).InternalStream()
-#define ABSL_PCHECK_IMPL(condition) ABSL_CHECK_IMPL(condition).WithPerror()
+#define ABSL_PCHECK_IMPL(condition) \
+ ABSL_CHECK_IMPL(condition, #condition).WithPerror()
#ifndef NDEBUG
-#define ABSL_DCHECK_IMPL(condition) ABSL_CHECK_IMPL(condition)
+#define ABSL_DCHECK_IMPL(condition) ABSL_CHECK_IMPL(condition, #condition)
#else
-#define ABSL_DCHECK_IMPL(condition) ABSL_CHECK_IMPL(true || (condition))
+#define ABSL_DCHECK_IMPL(condition) ABSL_CHECK_IMPL(true || (condition), "true")
#endif
// CHECK_EQ