diff options
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/image_writer.cc | 5 | ||||
| -rw-r--r-- | compiler/image_writer.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index 6abc6fae8a..8b7fbf6910 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -2274,12 +2274,11 @@ const ImageWriter::ImageInfo& ImageWriter::GetImageInfo(size_t index) const { return GetConstImageInfo(oat_filenames_[index]); } -void ImageWriter::UpdateOatFile(const char* oat_filename) { - std::unique_ptr<File> oat_file(OS::OpenFileForReading(oat_filename)); +void ImageWriter::UpdateOatFile(File* oat_file, const char* oat_filename) { DCHECK(oat_file != nullptr); size_t oat_loaded_size = 0; size_t oat_data_offset = 0; - ElfWriter::GetOatElfInformation(oat_file.get(), &oat_loaded_size, &oat_data_offset); + ElfWriter::GetOatElfInformation(oat_file, &oat_loaded_size, &oat_data_offset); ImageInfo& cur_image_info = GetImageInfo(oat_filename); diff --git a/compiler/image_writer.h b/compiler/image_writer.h index 622eb1985b..9371d9ffa9 100644 --- a/compiler/image_writer.h +++ b/compiler/image_writer.h @@ -123,7 +123,7 @@ class ImageWriter FINAL { // Update the oat size for the given oat file. This will make the oat_offset for the next oat // file valid. - void UpdateOatFile(const char* oat_filename); + void UpdateOatFile(File* oat_file, const char* oat_filename); private: bool AllocMemory(); |