Index: src/IceDefs.h |
diff --git a/src/IceDefs.h b/src/IceDefs.h |
index 453127523a4a3c460f13fe3c2e1224220bfdb57f..37fa2847ca4560ed3258c1897ab36b8ea448665f 100644 |
--- a/src/IceDefs.h |
+++ b/src/IceDefs.h |
@@ -45,6 +45,30 @@ |
namespace Ice { |
+constexpr bool buildAllowsAsserts() { |
John
2015/06/23 22:28:30
optional: As we spoke during our walk back, it see
Jim Stichnoth
2015/06/24 21:27:27
Done. I went with BuildDefs::asserts(), and simil
|
+#ifdef NDEBUG |
John
2015/06/23 22:28:30
This is a bit surprising to me. I always though
-
Jim Stichnoth
2015/06/24 21:27:27
Yep, NDEBUG is either defined or not, and its valu
|
+ return false; |
+#else // !NDEBUG |
+ return true; |
+#endif // !NDEBUG |
+} |
+ |
+constexpr bool buildAllowsExtraValidation() { |
+#ifdef ALLOW_EXTRA_VALIDATION |
John
2015/06/23 22:28:30
probably just
#if ALLOW_EXTRA_VALIDATION
?
Othe
Jim Stichnoth
2015/06/24 21:27:27
Done.
|
+ return true; |
+#else // !ALLOW_EXTRA_VALIDATION |
+ return false; |
+#endif // !ALLOW_EXTRA_VALIDATION |
+} |
+ |
+constexpr bool buildAllowsDump() { |
+#if defined(ALLOW_DUMP) && ALLOW_DUMP |
John
2015/06/23 22:28:30
this can be simply
#if ALLOW_DUMP
(see https://
Jim Stichnoth
2015/06/24 21:27:27
Done.
|
+ return true; |
+#else // !ALLOW_DUMP |
+ return false; |
+#endif // !ALLOW_DUMP |
+} |
+ |
class Assembler; |
class Cfg; |
class CfgNode; |