Mesa (master): nir: do not #include util/debug.h within extern C {}

Emil Velikov evelikov at kemper.freedesktop.org
Tue Feb 21 19:05:04 UTC 2017


Module: Mesa
Branch: master
Commit: e4f971c85f96f2cea8011e469170b4844deb34d9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4f971c85f96f2cea8011e469170b4844deb34d9

Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Thu Feb 16 15:16:38 2017 +0000

nir: do not #include util/debug.h within extern C {}

It's a problem waiting to happen. Individual headers should be annotated
if needed.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/compiler/nir/nir.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 84451a1..5243a9e 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -40,6 +40,10 @@
 #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)
 {




More information about the mesa-commit mailing list