summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Martijn Vels <mvels@google.com>2023-04-18 13:47:43 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-04-18 13:48:58 -0700
commitfb0debf5835320a261612a541520ba3c3a11685f (patch)
tree628c7ca4e2356cad956dedc655bcf8deeaf9596b
parent2d04ec1da212035cb2dd2576af60db4aa3f7bb72 (diff)
Add ABSL_RAW_DLOG and ABSL_RAW_DCHECK macros
PiperOrigin-RevId: 525241200 Change-Id: I8d1536cb813da8b80a978340343b0243a49928f7
-rw-r--r--absl/base/internal/raw_logging.h14
1 files changed, 14 insertions, 0 deletions
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