[llvm] 3a0c534 - [ORC] Fix -Wunused-function warning on windows (#166207)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 3 11:13:54 PST 2025


Author: Justin Bogner
Date: 2025-11-03T19:13:50Z
New Revision: 3a0c534032aac828a12fd2057b00197a12aa90b2

URL: https://github.com/llvm/llvm-project/commit/3a0c534032aac828a12fd2057b00197a12aa90b2
DIFF: https://github.com/llvm/llvm-project/commit/3a0c534032aac828a12fd2057b00197a12aa90b2.diff

LOG: [ORC] Fix -Wunused-function warning on windows (#166207)

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.

Added: 
    

Modified: 
    llvm/tools/llvm-jitlink/llvm-jitlink.cpp

Removed: 
    


################################################################################
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<MaterializationUnit::Interface>
 getTestObjectFileInterface(Session &S, MemoryBufferRef O) {


        


More information about the llvm-commits mailing list