summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2019-02-11 10:27:11 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-02-11 10:27:11 +0000
commit1e70b89afe0e022ec51210ea0da1e0706e194fd0 (patch)
tree1c2b9d0c52e008795ec122b4b904c85c103b3e31 /compiler/driver/compiler_driver.cc
parent61a9328e807426636d3e29699cd978d4a7a345c0 (diff)
parent6c70224ebd667b52a862f850893f6528af63f3e8 (diff)
Merge changes Id4ffa9f9,I1bb5d05d
* changes: Replace MergeSets() with std::set::merge(). Replace StringPiece with std::string_view.
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 2ab4c600f3..f39d8fc896 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1885,10 +1885,10 @@ void CompilerDriver::Verify(jobject jclass_loader,
// Merge all VerifierDeps into the main one.
verifier::VerifierDeps* verifier_deps = Thread::Current()->GetVerifierDeps();
for (ThreadPoolWorker* worker : parallel_thread_pool_->GetWorkers()) {
- verifier::VerifierDeps* thread_deps = worker->GetThread()->GetVerifierDeps();
- worker->GetThread()->SetVerifierDeps(nullptr);
- verifier_deps->MergeWith(*thread_deps, GetCompilerOptions().GetDexFilesForOatFile());
- delete thread_deps;
+ std::unique_ptr<verifier::VerifierDeps> thread_deps(worker->GetThread()->GetVerifierDeps());
+ worker->GetThread()->SetVerifierDeps(nullptr); // We just took ownership.
+ verifier_deps->MergeWith(std::move(thread_deps),
+ GetCompilerOptions().GetDexFilesForOatFile());
}
Thread::Current()->SetVerifierDeps(nullptr);
}