From 992c59a915c3bc835657d47fd9b585604cbb874b Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sat, 10 Aug 2024 14:49:13 +0900 Subject: [PATCH] GH-43463: [C++][Gandiva] Always use gdv_function_stubs.h in context_helper.cc (#43464) ### Rationale for this change `gdv_function_stubs.h` has declarations of functions in `context_helper.cc`. If we don't include `gdv_function_stubs.h`, it causes attribution mismatch error with unity build. ### What changes are included in this PR? Always include `gdv_function_stubs.h` in `context_helper.cc`. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #43463 Authored-by: Sutou Kouhei Signed-off-by: Sutou Kouhei --- cpp/src/gandiva/context_helper.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/src/gandiva/context_helper.cc b/cpp/src/gandiva/context_helper.cc index 03bbe1b7a67d9..8edd52b1fb070 100644 --- a/cpp/src/gandiva/context_helper.cc +++ b/cpp/src/gandiva/context_helper.cc @@ -15,11 +15,13 @@ // specific language governing permissions and limitations // under the License. +#include "gandiva/execution_context.h" +#include "gandiva/gdv_function_stubs.h" + // This file is also used in the pre-compiled unit tests, which do include // llvm/engine/.. #ifndef GANDIVA_UNIT_TEST #include "gandiva/exported_funcs.h" -#include "gandiva/gdv_function_stubs.h" #include "gandiva/engine.h" @@ -56,8 +58,6 @@ arrow::Status ExportedContextFunctions::AddMappings(Engine* engine) const { } // namespace gandiva #endif // !GANDIVA_UNIT_TEST -#include "gandiva/execution_context.h" - extern "C" { void gdv_fn_context_set_error_msg(int64_t context_ptr, char const* err_msg) {