gallium/gallivm: enable linking lp_bld_printf function with C++ code
authorJan Zielinski <jan.zielinski@intel.com>
Mon, 20 Jan 2020 12:57:36 +0000 (13:57 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Jan 2020 11:00:18 +0000 (11:00 +0000)
To enable linking functions declared in lp_bld_printf.h file with C++,
we need to add appropriate macros to the header.

Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3470>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3470>

src/gallium/auxiliary/gallivm/lp_bld_printf.h

index ede93cc834e51a0b97ee539a0d577ede12fcff7d..298b4033f086ae2800f8f9211aea9f261c637058 100644 (file)
@@ -28,6 +28,9 @@
 #ifndef LP_BLD_PRINTF_H
 #define LP_BLD_PRINTF_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #include "pipe/p_compiler.h"
 #include "lp_bld.h"
@@ -43,5 +46,9 @@ lp_build_print_value(struct gallivm_state *gallivm,
                      const char *msg,
                      LLVMValueRef value);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif