From f66031b556c386f582eab39b5c616104d77fc375 Mon Sep 17 00:00:00 2001 From: Vaibhav Devmurari Date: Thu, 7 Mar 2024 13:29:48 +0000 Subject: Revert "Remove Compiler::Kind" This reverts commit 3370f9fc477f0b25c4c6b10321b3f8e46903ad4f. Reason for revert: Build failure: b/328584377 Change-Id: I078c00e2df24950a156cd0c3ac6d78778f6ac2ba --- compiler/common_compiler_test.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'compiler/common_compiler_test.cc') diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc index 8c05888215..d2cf3aef3c 100644 --- a/compiler/common_compiler_test.cc +++ b/compiler/common_compiler_test.cc @@ -255,6 +255,14 @@ void CommonCompilerTestImpl::SetUpRuntimeOptionsImpl() { ApplyInstructionSet(); } +Compiler::Kind CommonCompilerTestImpl::GetCompilerKind() const { + return compiler_kind_; +} + +void CommonCompilerTestImpl::SetCompilerKind(Compiler::Kind compiler_kind) { + compiler_kind_ = compiler_kind; +} + void CommonCompilerTestImpl::TearDown() { code_and_metadata_.clear(); compiler_options_.reset(); @@ -270,7 +278,8 @@ void CommonCompilerTestImpl::CompileMethod(ArtMethod* method) { DCHECK(!Runtime::Current()->IsStarted()); Thread* self = Thread::Current(); StackHandleScope<2> hs(self); - std::unique_ptr compiler(Compiler::Create(*compiler_options_, &storage)); + std::unique_ptr compiler( + Compiler::Create(*compiler_options_, &storage, compiler_kind_)); const DexFile& dex_file = *method->GetDexFile(); Handle dex_cache = hs.NewHandle(GetClassLinker()->FindDexCache(self, dex_file)); -- cgit v1.2.3-59-g8ed1b