summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-11-23 13:16:43 +0000
committerEric Engestrom <[email protected]>2017-11-28 10:54:38 +0000
commit7b85b9b8773b119360a31b66b321ae560a77cb6d (patch)
tree6f1b3519d8219fe7256e20bd4bc7ae321378fb13 /src/compiler/nir/nir.h
parentbb46111c01479d831932eb63f69da5ccda29f6fc (diff)
compiler: use NDEBUG to guard asserts
nir_validate.c's #endif already had the correct NDEBUG comment Fixes: dcb1acdea00a8f2c29777 "nir/validate: Only build in debug mode" Fixes: 9ff71b649b4b3808a9e17 "i965/nir: Validate that NIR passes call nir_metadata_preserve()" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index cf200fdc665..c01fa6707a4 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -41,9 +41,9 @@
#include "compiler/shader_info.h"
#include <stdio.h>
-#ifdef DEBUG
+#ifndef NDEBUG
#include "util/debug.h"
-#endif /* DEBUG */
+#endif /* NDEBUG */
#include "nir_opcodes.h"
@@ -2336,7 +2336,7 @@ nir_deref_var *nir_deref_var_clone(const nir_deref_var *deref, void *mem_ctx);
nir_shader *nir_shader_serialize_deserialize(void *mem_ctx, nir_shader *s);
-#ifdef DEBUG
+#ifndef NDEBUG
void nir_validate_shader(nir_shader *shader);
void nir_metadata_set_validation_flag(nir_shader *shader);
void nir_metadata_check_validation_flag(nir_shader *shader);
@@ -2377,7 +2377,7 @@ static inline void nir_metadata_check_validation_flag(nir_shader *shader) { (voi
static inline bool should_clone_nir(void) { return false; }
static inline bool should_serialize_deserialize_nir(void) { return false; }
static inline bool should_print_nir(void) { return false; }
-#endif /* DEBUG */
+#endif /* NDEBUG */
#define _PASS(nir, do_pass) do { \
do_pass \