summaryrefslogtreecommitdiff
path: root/chromium/base/dcheck_is_on.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/dcheck_is_on.h')
-rw-r--r--chromium/base/dcheck_is_on.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/chromium/base/dcheck_is_on.h b/chromium/base/dcheck_is_on.h
new file mode 100644
index 00000000000..ee352053cc6
--- /dev/null
+++ b/chromium/base/dcheck_is_on.h
@@ -0,0 +1,14 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_DCHECK_IS_ON_H_
+#define BASE_DCHECK_IS_ON_H_
+
+#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
+#define DCHECK_IS_ON() false
+#else
+#define DCHECK_IS_ON() true
+#endif
+
+#endif // BASE_DCHECK_IS_ON_H_