Fix SSA liveness analysis test.
Create a persistent CompilerOptions object instead of
passing a temporary to the codegen.
Test: m valgrind-test-art-host-gtest-ssa_liveness_analysis_test
Change-Id: Icccf6aec0d024917aa1895d0804a79866f3cae43
diff --git a/compiler/optimizing/ssa_liveness_analysis_test.cc b/compiler/optimizing/ssa_liveness_analysis_test.cc
index cc48d31..1916c73 100644
--- a/compiler/optimizing/ssa_liveness_analysis_test.cc
+++ b/compiler/optimizing/ssa_liveness_analysis_test.cc
@@ -32,6 +32,7 @@
: pool_(),
allocator_(&pool_),
graph_(CreateGraph(&allocator_)),
+ compiler_options_(),
instruction_set_(kRuntimeISA) {
std::string error_msg;
instruction_set_features_ =
@@ -39,7 +40,7 @@
codegen_ = CodeGenerator::Create(graph_,
instruction_set_,
*instruction_set_features_,
- CompilerOptions());
+ compiler_options_);
CHECK(codegen_ != nullptr) << instruction_set_ << " is not a supported target architecture.";
// Create entry block.
entry_ = new (&allocator_) HBasicBlock(graph_);
@@ -59,6 +60,7 @@
ArenaPool pool_;
ArenaAllocator allocator_;
HGraph* graph_;
+ CompilerOptions compiler_options_;
InstructionSet instruction_set_;
std::unique_ptr<const InstructionSetFeatures> instruction_set_features_;
std::unique_ptr<CodeGenerator> codegen_;