Add a compile-time constant bool equivalent to !defined(NDEBUG).
This makes some code slightly less awkward.
Change-Id: Iafd359dd0baa65510ed9510a7d93ee01605f51e4
diff --git a/src/globals.h b/src/globals.h
index 4ec6dcb..35a2113 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -53,6 +53,13 @@
// compile-time constant so the compiler can generate better code.
const int kPageSize = 4096;
+// Whether or not this is a debug build. Useful in conditionals where NDEBUG isn't.
+#if defined(NDEBUG)
+const bool kIsDebugBuild = false;
+#else
+const bool kIsDebugBuild = true;
+#endif
+
} // namespace art
#endif // ART_SRC_GLOBALS_H_