Add explanatory comment.

llvm-svn: 282678
This commit is contained in:
Peter Collingbourne 2016-09-29 03:29:28 +00:00
parent 20ac943748
commit f75609e015
1 changed files with 4 additions and 0 deletions

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();
}