diff options
author | 2015-11-25 14:33:36 +0000 | |
---|---|---|
committer | 2015-11-30 18:19:44 +0000 | |
commit | 10c13565474de2786aad7c2e79757ea250747a15 (patch) | |
tree | 759bdf7aab97ab45e1a3e09f5d627e568f6e7084 /compiler/vector_output_stream.h | |
parent | e928dc587718d00d234768f76d1efb2ffe74e885 (diff) |
Refactor oat file writing to give Dex2Oat more control.
This is the first step towards writing dex files to oat file
and mapping them from there for the actual AOT compilation.
Change-Id: Icb0d27487eaf6ba3a66c157e695f9bdc5bb9cf9a
Diffstat (limited to 'compiler/vector_output_stream.h')
-rw-r--r-- | compiler/vector_output_stream.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/vector_output_stream.h b/compiler/vector_output_stream.h index 3c5877c0bd..a3c58d0800 100644 --- a/compiler/vector_output_stream.h +++ b/compiler/vector_output_stream.h @@ -29,9 +29,9 @@ class VectorOutputStream FINAL : public OutputStream { public: VectorOutputStream(const std::string& location, std::vector<uint8_t>* vector); - virtual ~VectorOutputStream() {} + ~VectorOutputStream() OVERRIDE {} - bool WriteFully(const void* buffer, size_t byte_count) { + bool WriteFully(const void* buffer, size_t byte_count) OVERRIDE { if (static_cast<size_t>(offset_) == vector_->size()) { const uint8_t* start = reinterpret_cast<const uint8_t*>(buffer); vector_->insert(vector_->end(), &start[0], &start[byte_count]); @@ -45,7 +45,11 @@ class VectorOutputStream FINAL : public OutputStream { return true; } - off_t Seek(off_t offset, Whence whence); + off_t Seek(off_t offset, Whence whence) OVERRIDE; + + bool Flush() OVERRIDE { + return true; + } private: void EnsureCapacity(off_t new_offset) { |