nir: do not #include util/debug.h within extern C {}
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 16 Feb 2017 15:16:38 +0000 (15:16 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 21 Feb 2017 18:29:17 +0000 (18:29 +0000)
It's a problem waiting to happen. Individual headers should be annotated
if needed.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/compiler/nir/nir.h

index 84451a17aad8c1829ff91bc251ac11fd7f317965..5243a9e58e8f9226cf6b0e907f71c50e37709f0e 100644 (file)
 #include "compiler/shader_info.h"
 #include <stdio.h>
 
+#ifdef DEBUG
+#include "util/debug.h"
+#endif /* DEBUG */
+
 #include "nir_opcodes.h"
 
 #ifdef __cplusplus
@@ -2279,7 +2283,6 @@ 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);
 
-#include "util/debug.h"
 static inline bool
 should_clone_nir(void)
 {