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 }
type_with_subtypest::copy_to_subtypes
void copy_to_subtypes(const typet &type)
Copy the provided type to the subtypes of this type.
Definition: type.cpp:17
type_with_subtypest::subtypest
std::vector< typet > subtypest
Definition: type.h:209
typet
The type of an expression, extends irept.
Definition: type.h:28
type_with_subtypest::subtypes
subtypest & subtypes()
Definition: type.h:222
type.h
remove_const
typet remove_const(typet type)
Remove const qualifier from type (if any).
Definition: type.cpp:32
type_with_subtypest::move_to_subtypes
void move_to_subtypes(typet &type)
Move the provided type to the subtypes of this type.
Definition: type.cpp:25
get_nil_irep
const irept & get_nil_irep()
Definition: irep.cpp:20
irept::remove
void remove(const irep_idt &name)
Definition: irep.cpp:96