10 #ifndef CPROVER_UTIL_ENDIANNESS_MAP_H
11 #define CPROVER_UTIL_ENDIANNESS_MAP_H
38 build(type, little_endian);
50 size_t result=
map[bit];
60 void build(
const typet &type,
bool little_endian);
62 void output(std::ostream &)
const;
66 std::vector<size_t>
map;
Maps a big-endian offset to a little-endian offset.
virtual ~endianness_mapt()=default
virtual void build_big_endian(const typet &type)
endianness_mapt(const typet &type, bool little_endian, const namespacet &_ns)
virtual void build_little_endian(const typet &type)
void build(const typet &type, bool little_endian)
endianness_mapt(const namespacet &_ns)
std::vector< size_t > map
size_t number_of_bits() const
void output(std::ostream &) const
size_t map_bit(size_t bit) const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
The type of an expression, extends irept.
std::ostream & operator<<(std::ostream &out, const endianness_mapt &m)
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
#define PRECONDITION(CONDITION)