diff options
Diffstat (limited to 'tools/standalone_miri/value.hpp')
-rw-r--r-- | tools/standalone_miri/value.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/standalone_miri/value.hpp b/tools/standalone_miri/value.hpp index baa47e3f..03689215 100644 --- a/tools/standalone_miri/value.hpp +++ b/tools/standalone_miri/value.hpp @@ -119,6 +119,8 @@ public: return AllocationPtr(); } + void resize(size_t new_size); + void check_bytes_valid(size_t ofs, size_t size) const; void mark_bytes_valid(size_t ofs, size_t size); @@ -223,10 +225,15 @@ struct ValueRef ValueRef(AllocationPtr ptr, size_t ofs, size_t size): m_alloc(ptr), + m_value(nullptr), m_offset(ofs), m_size(size) { } + ValueRef(Value& val): + ValueRef(val, 0, val.size()) + { + } ValueRef(Value& val, size_t ofs, size_t size): m_value(&val), m_offset(ofs), @@ -273,3 +280,4 @@ struct ValueRef uint64_t read_usize(size_t ofs) const; int64_t read_isize(size_t ofs) const { return static_cast<int64_t>(read_usize(ofs)); } }; +extern ::std::ostream& operator<<(::std::ostream& os, const ValueRef& v); |