Mesa (main): pan/va: Add header guards to valhall_enums.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 21 22:41:34 UTC 2022


Module: Mesa
Branch: main
Commit: 1b29a99b7bff6417f437147d44547b7a9c914c6e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b29a99b7bff6417f437147d44547b7a9c914c6e

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Thu Jun 16 14:49:41 2022 -0400

pan/va: Add header guards to valhall_enums.h

Otherwise we can't #include in multiple places.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17091>

---

 src/panfrost/bifrost/valhall/valhall_enums.h.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/panfrost/bifrost/valhall/valhall_enums.h.py b/src/panfrost/bifrost/valhall/valhall_enums.h.py
index 25ed606a2ca..83981c44494 100644
--- a/src/panfrost/bifrost/valhall/valhall_enums.h.py
+++ b/src/panfrost/bifrost/valhall/valhall_enums.h.py
@@ -23,6 +23,9 @@
 
 from valhall import safe_name, enums
 
+print("#ifndef __VALHALL_ENUMS_H_")
+print("#define __VALHALL_ENUMS_H_")
+
 for enum in sorted(enums):
     print(f"enum va_{safe_name(enum)} {{")
 
@@ -32,3 +35,5 @@ for enum in sorted(enums):
             print(f"   {key.upper()} = {i},")
 
     print("};\n")
+
+print("#endif")



More information about the mesa-commit mailing list