cprover
bv_endianness_map.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Michael Tautschnig
6 
7 \*******************************************************************/
8 
9 #include "bv_endianness_map.h"
10 
11 #include <util/arith_tools.h>
12 #include <util/c_types.h>
13 
14 #include "boolbv_width.h"
15 
17 {
18  const std::size_t width = boolbv_width(src);
19 
20  if(width == 0)
21  return;
22 
23  const std::size_t new_size = map.size() + width;
24  map.reserve(new_size);
25 
26  for(std::size_t i = map.size(); i < new_size; ++i)
27  map.push_back(i);
28 }
29 
31 {
32  if(src.id() == ID_pointer)
34  else
36 }
The type of an expression, extends irept.
Definition: type.h:27
const irep_idt & id() const
Definition: irep.h:259
boolbv_widtht & boolbv_width
virtual void build_little_endian(const typet &type) override
virtual void build_big_endian(const typet &type) override
virtual void build_big_endian(const typet &type)
std::vector< size_t > map