cprover
ansi_c_convert_type.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: ANSI-C Language Conversion
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_ANSI_C_ANSI_C_CONVERT_TYPE_H
13 #define CPROVER_ANSI_C_ANSI_C_CONVERT_TYPE_H
14 
15 #include <util/message.h>
16 
17 #include "c_qualifiers.h"
18 #include "c_storage_spec.h"
19 
21 {
22 public:
27 
28  // extensions
33 
35 
36  bool packed, aligned;
38  exprt msc_based; // this is Visual Studio
40 
41  // storage spec
43 
44  // qualifiers
46 
47  void read(const typet &type);
48  void write(typet &type);
49 
51 
52  std::list<typet> other;
53 
54  explicit ansi_c_convert_typet(message_handlert &_message_handler):
55  messaget(_message_handler)
56  {
57  }
58 
59  void clear()
60  {
61  unsigned_cnt=signed_cnt=char_cnt=int_cnt=short_cnt=
62  long_cnt=double_cnt=float_cnt=c_bool_cnt=proper_bool_cnt=complex_cnt=
63  int8_cnt=int16_cnt=int32_cnt=int64_cnt=
64  ptr32_cnt=ptr64_cnt=
65  gcc_float128_cnt=gcc_int128_cnt=bv_cnt=floatbv_cnt=fixedbv_cnt=0;
66  vector_size.make_nil();
67  alignment.make_nil();
68  bv_width.make_nil();
69  fraction_width.make_nil();
70  msc_based.make_nil();
71  gcc_attribute_mode.make_nil();
72 
73  packed=aligned=constructor=destructor=false;
74 
75  other.clear();
76  c_storage_spec.clear();
77  c_qualifiers.clear();
78  }
79 
80 protected:
81  void read_rec(const typet &type);
82 };
83 
84 #endif // CPROVER_ANSI_C_ANSI_C_CONVERT_TYPE_H
The type of an expression.
Definition: type.h:20
source_locationt source_location
std::list< typet > other
c_storage_spect c_storage_spec
void read(const typet &type)
Base class for all expressions.
Definition: expr.h:46
void read_rec(const typet &type)
void make_nil()
Definition: irep.h:243
ansi_c_convert_typet(message_handlert &_message_handler)