Index: cc/dcheck.h |
diff --git a/cc/dcheck.h b/cc/dcheck.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2b14b2c02cce2b3a7e4dc764068e73b78fc28d6d |
--- /dev/null |
+++ b/cc/dcheck.h |
@@ -0,0 +1,23 @@ |
+// Copyright (c) 2012 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 CC_DCHECK_H_ |
+#define CC_DCHECK_H_ |
+ |
+#include "base/logging.h" |
+ |
+// TODO(danakj): If we can convince the world to remove the --enable-dchecks |
+// command line option, and have a compiler flag available in cc/dcheck.h |
+// to tell if DCHECKs will be compiled, then remove this file and replace |
+// all CC_CC_DCHECK() calls with CC_DCHECK() instead. |
+ |
+#define CC_DCHECK_ENABLED() (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) |
+ |
+#if CC_DCHECK_ENABLED() |
+#define CC_DCHECK(a) DCHECK(a) |
+#else |
+#define CC_DCHECK(a) |
+#endif |
+ |
+#endif // CC_DCHECK_H_ |