From 1806597781b49050d23a8b7767108e7a1b487277 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 23 Oct 2025 09:39:28 -0700 Subject: [PATCH] [ORC] Fix -Wunused-function warning on windows All of the users of this function are guarded by LLVM_ON_UNIX and LLVM_ENABLE_THREADS ifdefs, so wrap the function itself in these guards as well to avoid the unused function warning. --- llvm/tools/llvm-jitlink/llvm-jitlink.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp index 79216e89c7cba..88d6daf08d35e 100644 --- a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp +++ b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp @@ -776,6 +776,7 @@ createSharedMemoryManager(SimpleRemoteEPC &SREPC) { SlabSize, SREPC, SAs); } +#if LLVM_ON_UNIX && LLVM_ENABLE_THREADS static void setupEPCRemoteMemoryManager(SimpleRemoteEPC::Setup &S) { switch (UseMemMgr) { case MemMgr::Default: @@ -789,6 +790,7 @@ static void setupEPCRemoteMemoryManager(SimpleRemoteEPC::Setup &S) { break; } } +#endif static Expected getTestObjectFileInterface(Session &S, MemoryBufferRef O) {