summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-09-29 03:29:28 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-09-29 03:29:28 +0000
commitf75609e015cdb9eb1014b4d2e9cf9fd942bb7b20 (patch)
tree527aba1a44e470ae53a563b9f45ee1f33cec93b7 /llvm/lib
parent20ac943748aec8f98694b7b024b206e8bd86b932 (diff)
downloadbcm5719-llvm-f75609e015cdb9eb1014b4d2e9cf9fd942bb7b20.tar.gz
bcm5719-llvm-f75609e015cdb9eb1014b4d2e9cf9fd942bb7b20.zip
Add explanatory comment.
llvm-svn: 282678
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 86ab8aac509..c2fff4a684a 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -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();
}
OpenPOWER on IntegriCloud