CBMC
type.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Implementations of some functions of typet
4 
5 Author: Daniel Kroening, kroening@kroening.com
6  Maria Svorenova, maria.svorenova@diffblue.com
7 
8 \*******************************************************************/
9 
12 
13 #include "type.h"
14 
18 {
19  subtypes().push_back(type);
20 }
21 
26 {
27  subtypest &sub=subtypes();
28  sub.push_back(static_cast<const typet &>(get_nil_irep()));
29  sub.back().swap(type);
30 }
31 
33 {
34  type.remove(ID_C_constant);
35  return type;
36 }
void remove(const irep_idt &name)
Definition: irep.cpp:87
void move_to_subtypes(typet &type)
Move the provided type to the subtypes of this type.
Definition: type.cpp:25
subtypest & subtypes()
Definition: type.h:237
std::vector< typet > subtypest
Definition: type.h:224
void copy_to_subtypes(const typet &type)
Copy the provided type to the subtypes of this type.
Definition: type.cpp:17
The type of an expression, extends irept.
Definition: type.h:29
const irept & get_nil_irep()
Definition: irep.cpp:19
typet remove_const(typet type)
Remove const qualifier from type (if any).
Definition: type.cpp:32
Defines typet, type_with_subtypet and type_with_subtypest.