From e59ed6683470244118d67a0366e9e90fef1c8b7d Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Fri, 23 Feb 2024 06:50:14 +0100 Subject: [PATCH] Include `LLVMSPIRVLib.h` in `SPIRVError.cpp` (#2377) The prototype for `getErrorMessage()` is declared in `LLVMSPIRVLib.h`, but `SPIRVError.cpp` defining that function did not include `LLVMSPIRVLib.h`. This can be problematic for builds that use `-fvisibility=hidden`. Fixes https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/2376 Original commit: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/81f78d24db36622 --- llvm-spirv/lib/SPIRV/libSPIRV/SPIRVError.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm-spirv/lib/SPIRV/libSPIRV/SPIRVError.cpp b/llvm-spirv/lib/SPIRV/libSPIRV/SPIRVError.cpp index 44c63128b61ae..9c40039b6ebd6 100644 --- a/llvm-spirv/lib/SPIRV/libSPIRV/SPIRVError.cpp +++ b/llvm-spirv/lib/SPIRV/libSPIRV/SPIRVError.cpp @@ -36,6 +36,8 @@ // //===----------------------------------------------------------------------===// +#include "LLVMSPIRVLib.h" + #include "SPIRVError.h" #include