From fb0debf5835320a261612a541520ba3c3a11685f Mon Sep 17 00:00:00 2001 From: Martijn Vels Date: Tue, 18 Apr 2023 13:47:43 -0700 Subject: Add ABSL_RAW_DLOG and ABSL_RAW_DCHECK macros PiperOrigin-RevId: 525241200 Change-Id: I8d1536cb813da8b80a978340343b0243a49928f7 --- absl/base/internal/raw_logging.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'absl/base/internal') diff --git a/absl/base/internal/raw_logging.h b/absl/base/internal/raw_logging.h index bdd536a1..e8765254 100644 --- a/absl/base/internal/raw_logging.h +++ b/absl/base/internal/raw_logging.h @@ -90,6 +90,20 @@ } \ } while (0) +#ifndef NDEBUG + +#define ABSL_RAW_DLOG(severity, ...) ABSL_RAW_LOG(severity, __VA_ARGS__) +#define ABSL_RAW_DCHECK(condition, message) ABSL_RAW_CHECK(condition, message) + +#else // NDEBUG + +#define ABSL_RAW_DLOG(severity, ...) \ + while (false) ABSL_RAW_LOG(severity, __VA_ARGS__) +#define ABSL_RAW_DCHECK(condition, message) \ + while (false) ABSL_RAW_CHECK(condition, message) + +#endif // NDEBUG + #define ABSL_RAW_LOG_INTERNAL_INFO ::absl::LogSeverity::kInfo #define ABSL_RAW_LOG_INTERNAL_WARNING ::absl::LogSeverity::kWarning #define ABSL_RAW_LOG_INTERNAL_ERROR ::absl::LogSeverity::kError -- cgit v1.2.3