cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
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
17
void
type_with_subtypest::copy_to_subtypes
(
const
typet
&type)
18
{
19
subtypes
().push_back(type);
20
}
21
25
void
type_with_subtypest::move_to_subtypes
(
typet
&type)
26
{
27
subtypest
&sub=
subtypes
();
28
sub.push_back(
static_cast<
const
typet
&
>
(
get_nil_irep
()));
29
sub.back().swap(type);
30
}
31
32
typet
remove_const
(
typet
type)
33
{
34
type.
remove
(ID_C_constant);
35
return
type;
36
}
irept::remove
void remove(const irep_idt &name)
Definition
irep.cpp:87
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
type_with_subtypest::subtypest
std::vector< typet > subtypest
Definition
type.h:224
type_with_subtypest::subtypes
subtypest & subtypes()
Definition
type.h:237
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
typet
The type of an expression, extends irept.
Definition
type.h:29
typet::typet
typet()
Definition
type.h:31
get_nil_irep
const irept & get_nil_irep()
Definition
irep.cpp:19
remove_const
typet remove_const(typet type)
Remove const qualifier from type (if any).
Definition
type.cpp:32
type.h
Defines typet, type_with_subtypet and type_with_subtypest.
util
type.cpp
Generated by
1.17.0