[llvm] 626d0fa - [llvm-jitlink-executor] Fix unused function warning with LLVM_ENABLE_THREADS=0 (NFC)

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 02:50:17 PST 2024


Author: Stefan Gränitz
Date: 2024-01-23T11:49:41+01:00
New Revision: 626d0fa30addc6e8fb9af4a80df853af645733b4

URL: https://github.com/llvm/llvm-project/commit/626d0fa30addc6e8fb9af4a80df853af645733b4
DIFF: https://github.com/llvm/llvm-project/commit/626d0fa30addc6e8fb9af4a80df853af645733b4.diff

LOG: [llvm-jitlink-executor] Fix unused function warning with LLVM_ENABLE_THREADS=0 (NFC)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp b/llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp
index 20205eed82aa799..c98bb26b954d99a 100644
--- a/llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp
+++ b/llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp
@@ -112,6 +112,8 @@ int openListener(std::string Host, std::string PortStr) {
 #endif // LLVM_ON_UNIX
 }
 
+#if LLVM_ENABLE_THREADS
+
 // JITLink debug support plugins put information about JITed code in this GDB
 // JIT Interface global from OrcTargetProcess.
 extern "C" struct jit_descriptor __jit_debug_descriptor;
@@ -123,6 +125,8 @@ static void *findLastDebugDescriptorEntryPtr() {
   return Last;
 }
 
+#endif
+
 int main(int argc, char *argv[]) {
 #if LLVM_ENABLE_THREADS
 


        


More information about the llvm-commits mailing list