[llvm] fb870cb - [ORC] Fix unused variable warning (#164444)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 09:06:34 PDT 2025


Author: Walter Lee
Date: 2025-10-21T12:06:30-04:00
New Revision: fb870cb47fc549a9efc20ecf50726269a2aa9677

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

LOG: [ORC] Fix unused variable warning (#164444)

This fixes a potentially unused variable that's only used in an assert.

This is a fix for #164340.

Added: 
    

Modified: 
    llvm/unittests/ExecutionEngine/Orc/WaitingOnGraphTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ExecutionEngine/Orc/WaitingOnGraphTest.cpp b/llvm/unittests/ExecutionEngine/Orc/WaitingOnGraphTest.cpp
index b988a78a3783a..08b4e8f40e3d0 100644
--- a/llvm/unittests/ExecutionEngine/Orc/WaitingOnGraphTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/WaitingOnGraphTest.cpp
@@ -54,7 +54,9 @@ class WaitingOnGraphTest : public testing::Test {
       return ContainerElementsMap();
 
     ContainerElementsMap Result = SNs[0]->defs();
+#ifndef NDEBUG
     const ContainerElementsMap &Deps = SNs[0]->deps();
+#endif // NDEBUG
 
     for (size_t I = 1; I != SNs.size(); ++I) {
       assert(!DepsMustMatch || SNs[I]->deps() == Deps);


        


More information about the llvm-commits mailing list