diff options
author | John Hodge <tpg@mutabah.net> | 2018-05-13 09:27:13 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-05-13 09:27:13 +0800 |
commit | ac6f3ffba823e539c4c9afd93b7edf7122f463cc (patch) | |
tree | 418ebc63c6d5a28560bb396f1992505e80182515 /tools/standalone_miri/hir_sim.hpp | |
parent | 9f8469d5145ea51f2d4b2b9d1eb32d1029cfbeb5 (diff) | |
download | mrust-ac6f3ffba823e539c4c9afd93b7edf7122f463cc.tar.gz |
Standalone MIRI - Better vtable handling, fix to offset with null pointers
Diffstat (limited to 'tools/standalone_miri/hir_sim.hpp')
-rw-r--r-- | tools/standalone_miri/hir_sim.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/standalone_miri/hir_sim.hpp b/tools/standalone_miri/hir_sim.hpp index 7154de13..1dc9bcc4 100644 --- a/tools/standalone_miri/hir_sim.hpp +++ b/tools/standalone_miri/hir_sim.hpp @@ -23,7 +23,7 @@ struct DataType; enum class RawType { Unreachable, - Function, + Function, // TODO: Needs a way of indicating the signature? Unit, Bool, @@ -39,7 +39,7 @@ enum class RawType Char, Str, Composite, // Struct, Enum, Union, tuple, ... - TraitObject, // Data pointer is `*const ()`, metadata type stored in `composite_type` + TraitObject, // Data pointer is `*const ()`, vtable type stored in `composite_type` }; struct TypeWrapper { @@ -120,7 +120,7 @@ namespace HIR { size_t get_size(size_t ofs=0) const; bool has_slice_meta() const; // The attached metadata is a count const TypeRef* get_usized_type(size_t& running_inner_size) const; - const TypeRef* get_meta_type() const; + TypeRef get_meta_type() const; TypeRef get_inner() const; TypeRef wrap(TypeWrapper::Ty ty, size_t size) const; TypeRef get_field(size_t idx, size_t& ofs) const; |