Add explanatory comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Collingbourne 2016-09-29 03:29:28 +00:00
parent 66f2dbfec5
commit 8579d6c83c

View File

@ -253,6 +253,10 @@ void splitCodeGen(Config &C, TargetMachine *TM, AddStreamFn AddStream,
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();
}