Mesa (master): nir/builtin: Add extern "C" guards to nir_builtin_builder.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Oct 12 08:29:39 UTC 2019


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

Author: Neil Roberts <nroberts at igalia.com>
Date:   Fri Oct 11 16:01:30 2019 +0200

nir/builtin: Add extern "C" guards to nir_builtin_builder.h

That way it can also be included from a C++ source.

Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>

---

 src/compiler/nir/nir_builtin_builder.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/compiler/nir/nir_builtin_builder.h b/src/compiler/nir/nir_builtin_builder.h
index 22115ada241..2ec300c4474 100644
--- a/src/compiler/nir/nir_builtin_builder.h
+++ b/src/compiler/nir/nir_builtin_builder.h
@@ -27,6 +27,10 @@
 #include "util/u_math.h"
 #include "nir/nir_builder.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Functions are sorted alphabetically with removed type and "fast" prefix.
  * Definitions for functions in the C file come first.
@@ -212,4 +216,8 @@ nir_select(nir_builder *b, nir_ssa_def *x, nir_ssa_def *y, nir_ssa_def *s)
    return nir_bcsel(b, nir_ieq(b, s, nir_imm_intN_t(b, 0, s->bit_size)), x, y);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NIR_BUILTIN_BUILDER_H */




More information about the mesa-commit mailing list