diff options
Diffstat (limited to 'compiler/optimizing/optimizing_unit_test.h')
-rw-r--r-- | compiler/optimizing/optimizing_unit_test.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler/optimizing/optimizing_unit_test.h b/compiler/optimizing/optimizing_unit_test.h index 98ba38a59a..d0df4b89e5 100644 --- a/compiler/optimizing/optimizing_unit_test.h +++ b/compiler/optimizing/optimizing_unit_test.h @@ -241,13 +241,14 @@ class OptimizingUnitTestHelper { // Create the dex file based on the fake data. Call the constructor so that we can use virtual // functions. Don't use the arena for the StandardDexFile otherwise the dex location leaks. - dex_files_.emplace_back(new StandardDexFile( - dex_data, - sizeof(StandardDexFile::Header), - "no_location", - /*location_checksum*/ 0, - /*oat_dex_file*/ nullptr, - /*container*/ nullptr)); + auto container = + std::make_shared<MemoryDexFileContainer>(dex_data, sizeof(StandardDexFile::Header)); + dex_files_.emplace_back(new StandardDexFile(dex_data, + sizeof(StandardDexFile::Header), + "no_location", + /*location_checksum*/ 0, + /*oat_dex_file*/ nullptr, + std::move(container))); graph_ = new (allocator) HGraph( allocator, |