summaryrefslogtreecommitdiff
path: root/compiler/optimizing/codegen_test.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-01-06 14:13:52 -0800
committerAndreas Gampe <agampe@google.com>2015-01-06 14:13:52 -0800
commitdf64950a466c0f00cd36120d1afd389c577cae87 (patch)
treed2452b35379bb084ee2975a1ee3bc0ad9517e1c0 /compiler/optimizing/codegen_test.cc
parent78990227774cf47bebe8bc7b3781e24c6f79f55e (diff)
ART: Fix leak in codegen_test
Make sure the InstructionSetFeatures isn't leaked. Change-Id: Ide25773500c1513ecb204a380bb0a95513ff7276
Diffstat (limited to 'compiler/optimizing/codegen_test.cc')
-rw-r--r--compiler/optimizing/codegen_test.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/codegen_test.cc b/compiler/optimizing/codegen_test.cc
index 4c06e23bbc..18722f732b 100644
--- a/compiler/optimizing/codegen_test.cc
+++ b/compiler/optimizing/codegen_test.cc
@@ -88,7 +88,9 @@ static void RunCodeBaseline(HGraph* graph, bool has_result, Expected expected) {
Run(allocator, codegenX86, has_result, expected);
}
- arm::CodeGeneratorARM codegenARM(graph, ArmInstructionSetFeatures::FromCppDefines());
+ std::unique_ptr<const ArmInstructionSetFeatures> features(
+ ArmInstructionSetFeatures::FromCppDefines());
+ arm::CodeGeneratorARM codegenARM(graph, features.get());
codegenARM.CompileBaseline(&allocator, true);
if (kRuntimeISA == kArm || kRuntimeISA == kThumb2) {
Run(allocator, codegenARM, has_result, expected);