[llvm] r282678 - Add explanatory comment.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 20:29:29 PDT 2016


Author: pcc
Date: Wed Sep 28 22:29:28 2016
New Revision: 282678

URL: http://llvm.org/viewvc/llvm-project?rev=282678&view=rev
Log:
Add explanatory comment.

Modified:
    llvm/trunk/lib/LTO/LTOBackend.cpp

Modified: llvm/trunk/lib/LTO/LTOBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOBackend.cpp?rev=282678&r1=282677&r2=282678&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOBackend.cpp (original)
+++ llvm/trunk/lib/LTO/LTOBackend.cpp Wed Sep 28 22:29:28 2016
@@ -253,6 +253,10 @@ void splitCodeGen(Config &C, TargetMachi
             std::move(BC), ThreadCount++);
       },
       false);
+
+  // Because the inner lambda (which runs in a worker thread) captures our local
+  // variables, we need to wait for the worker threads to terminate before we
+  // can leave the function scope.
   CodegenThreadPool.wait();
 }
 




More information about the llvm-commits mailing list