diff options
Diffstat (limited to 'compiler/oat_test.cc')
| -rw-r--r-- | compiler/oat_test.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc index ffeff760c6..64ee574889 100644 --- a/compiler/oat_test.cc +++ b/compiler/oat_test.cc @@ -92,7 +92,7 @@ class OatTest : public CommonCompilerTest { const std::vector<std::string>& compiler_options, /*out*/std::string* error_msg) { ASSERT_TRUE(error_msg != nullptr); - insn_features_.reset(InstructionSetFeatures::FromVariant(insn_set, "default", error_msg)); + insn_features_ = InstructionSetFeatures::FromVariant(insn_set, "default", error_msg); ASSERT_TRUE(insn_features_ != nullptr) << error_msg; compiler_options_.reset(new CompilerOptions); for (const std::string& option : compiler_options) { @@ -203,7 +203,8 @@ class OatTest : public CommonCompilerTest { } linker::MultiOatRelativePatcher patcher(compiler_driver_->GetInstructionSet(), instruction_set_features_.get()); - oat_writer.PrepareLayout(compiler_driver_.get(), nullptr, dex_files, &patcher); + oat_writer.Initialize(compiler_driver_.get(), nullptr, dex_files); + oat_writer.PrepareLayout(&patcher); size_t rodata_size = oat_writer.GetOatHeader().GetExecutableOffset(); size_t text_size = oat_writer.GetOatSize() - rodata_size; elf_writer->PrepareDynamicSection(rodata_size, |