diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2015-08-31 00:09:01 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-08-31 00:09:01 +0000 |
commit | 592ee15e14b9ae3bb02320ed55c1daf55f980a94 (patch) | |
tree | 9cdf5c13758d4f9dc158863652e03c5c7be3094c /llvm/lib/CodeGen/ParallelCG.cpp | |
parent | 30e1797b382c0f5313e40b17bf041cf7885b0d1a (diff) | |
download | bcm5719-llvm-592ee15e14b9ae3bb02320ed55c1daf55f980a94.tar.gz bcm5719-llvm-592ee15e14b9ae3bb02320ed55c1daf55f980a94.zip |
Support: Support LLVM_ENABLE_THREADS=0 in llvm/Support/thread.h.
Specifically, the header now provides llvm::thread, which is either a
typedef of std::thread or a replacement that calls the function synchronously
depending on the value of LLVM_ENABLE_THREADS.
llvm-svn: 246402
Diffstat (limited to 'llvm/lib/CodeGen/ParallelCG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ParallelCG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ParallelCG.cpp b/llvm/lib/CodeGen/ParallelCG.cpp index 3e6a71d602b..748d3883ea1 100644 --- a/llvm/lib/CodeGen/ParallelCG.cpp +++ b/llvm/lib/CodeGen/ParallelCG.cpp @@ -56,7 +56,7 @@ llvm::splitCodeGen(std::unique_ptr<Module> M, return M; } - std::vector<std::thread> Threads; + std::vector<thread> Threads; SplitModule(std::move(M), OSs.size(), [&](std::unique_ptr<Module> MPart) { // We want to clone the module in a new context to multi-thread the codegen. // We do it by serializing partition modules to bitcode (while still on the @@ -88,7 +88,7 @@ llvm::splitCodeGen(std::unique_ptr<Module> M, std::move(BC)); }); - for (std::thread &T : Threads) + for (thread &T : Threads) T.join(); return {}; |