From 93205e395f777c1dd81d3f164cf9a4aec4bde45f Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 13 Apr 2016 11:59:46 +0100 Subject: Move Assemblers to the Arena. And clean up some APIs to return std::unique_ptr<> instead of raw pointers that don't communicate ownership. Change-Id: I3017302307a0253d661240750298802fb0d9585e --- compiler/optimizing/optimizing_compiler.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index cad94c7ad7..3670ce2253 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -948,13 +948,11 @@ bool OptimizingCompiler::JitCompile(Thread* self, info.frame_size_in_bytes = method_header->GetFrameSizeInBytes(); info.code_info = stack_map_size == 0 ? nullptr : stack_map_data; info.cfi = ArrayRef(*codegen->GetAssembler()->cfi().data()); - ArrayRef elf_file = debug::WriteDebugElfFileForMethods( + std::vector elf_file = debug::WriteDebugElfFileForMethods( GetCompilerDriver()->GetInstructionSet(), GetCompilerDriver()->GetInstructionSetFeatures(), ArrayRef(&info, 1)); - CreateJITCodeEntryForAddress(code_address, - std::unique_ptr(elf_file.data()), - elf_file.size()); + CreateJITCodeEntryForAddress(code_address, std::move(elf_file)); } Runtime::Current()->GetJit()->AddMemoryUsage(method, arena.BytesUsed()); -- cgit v1.2.3-59-g8ed1b