[llvm] b25fc41 - [Support] In tests, fix warning: variable ‘Threads’ set but not used

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 15 06:05:08 PST 2020


Author: Alexandre Ganea
Date: 2020-02-15T09:05:01-05:00
New Revision: b25fc4123c77097c05ea221e023fa5c6a16e0f41

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

LOG: [Support] In tests, fix warning: variable ‘Threads’ set but not used

Added: 
    

Modified: 
    llvm/unittests/Support/ThreadPool.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Support/ThreadPool.cpp b/llvm/unittests/Support/ThreadPool.cpp
index 237be875909b..25e71ae6a6a9 100644
--- a/llvm/unittests/Support/ThreadPool.cpp
+++ b/llvm/unittests/Support/ThreadPool.cpp
@@ -179,10 +179,8 @@ void ThreadPoolTest::TestAllThreads(ThreadPoolStrategy S) {
 
   llvm::DenseSet<llvm::BitVector> ThreadsUsed;
   std::mutex Lock;
-  unsigned Threads = 0;
   {
     ThreadPool Pool(S);
-    Threads = Pool.getThreadCount();
     for (size_t I = 0; I < 10000; ++I) {
       Pool.async([&] {
         waitForMainThread();


        


More information about the llvm-commits mailing list