diff options
author | 2019-02-07 16:17:33 +0000 | |
---|---|---|
committer | 2019-02-08 17:19:20 +0000 | |
commit | 6c70224ebd667b52a862f850893f6528af63f3e8 (patch) | |
tree | 43e1ed17ee7fdfd7081cb07e11700b77c38a5a52 /compiler/driver/compiler_driver.cc | |
parent | 8581e2a234b562880c1d6c6b5ad14d23f7b597ed (diff) |
Replace MergeSets() with std::set::merge().
And clear up ownership of the VerifierDeps being merged
by using std::unique_ptr<>.
Test: m test-art-host-gtest
Test: testrunner.py --host
Bug: 123750182
Change-Id: Id4ffa9f9fa1968fa762b9e825f25827240f6d45d
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r-- | compiler/driver/compiler_driver.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 56333b6d45..d9c0bf3922 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -1928,10 +1928,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); } |