summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Sebastien Hertz <shertz@google.com> 2013-12-13 12:02:36 +0100
committer Sebastien Hertz <shertz@google.com> 2013-12-13 12:06:07 +0100
commit501baec5f2de2156bb5ed7f66d23f1b1ad026267 (patch)
treef306df42b75ed9e79af4e7547b4777c87829fdba /compiler/driver/compiler_driver.cc
parent315ab6c077c4db2031f1ffa40b78722d8269dc9b (diff)
Cleanup thread pool tasks creation.
Removes unused vector when adding new ForAllClosure tasks to the thread pool. Change-Id: Ie0c8067bc5cbfac45db04a6242bc98f89c3efc8d
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 7b428793ab..87569d5b2a 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1384,11 +1384,9 @@ class ParallelCompilationManager {
self->AssertNoPendingException();
CHECK_GT(work_units, 0U);
- std::vector<ForAllClosure*> closures(work_units);
index_ = begin;
for (size_t i = 0; i < work_units; ++i) {
- closures[i] = new ForAllClosure(this, end, callback);
- thread_pool_->AddTask(self, closures[i]);
+ thread_pool_->AddTask(self, new ForAllClosure(this, end, callback));
}
thread_pool_->StartWorkers(self);