CBMC
cpp_storage_spec.cpp
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module:
4
5
Author: Michael Tautschnig
6
7
\*******************************************************************/
8
9
#include "
cpp_storage_spec.h
"
10
11
#include <
util/type.h
>
12
13
void
cpp_storage_spect::read
(
const
typet
&type)
14
{
15
if
(type.
id
() == ID_merged_type || type.
id
() == ID_function_type)
16
{
17
for
(
const
typet
&subtype :
to_type_with_subtypes
(type).subtypes())
18
read
(subtype);
19
}
20
else
if
(type.
id
() == ID_static)
21
set_static
();
22
else
if
(type.
id
() == ID_extern)
23
set_extern
();
24
else
if
(type.
id
() == ID_auto)
25
set_auto
();
26
else
if
(type.
id
() == ID_register)
27
set_register
();
28
else
if
(type.
id
() == ID_mutable)
29
set_mutable
();
30
else
if
(type.
id
() == ID_thread_local)
31
set_thread_local
();
32
else
if
(type.
id
() == ID_asm)
33
set_asm
();
34
else
if
(type.
id
() == ID_weak)
35
set_weak
();
36
}
cpp_storage_spect::set_extern
void set_extern()
Definition:
cpp_storage_spec.h:52
cpp_storage_spect::set_static
void set_static()
Definition:
cpp_storage_spec.h:51
cpp_storage_spect::set_mutable
void set_mutable()
Definition:
cpp_storage_spec.h:55
cpp_storage_spect::set_auto
void set_auto()
Definition:
cpp_storage_spec.h:53
cpp_storage_spect::set_thread_local
void set_thread_local()
Definition:
cpp_storage_spec.h:56
cpp_storage_spect::set_asm
void set_asm()
Definition:
cpp_storage_spec.h:57
cpp_storage_spect::set_weak
void set_weak()
Definition:
cpp_storage_spec.h:58
cpp_storage_spect::set_register
void set_register()
Definition:
cpp_storage_spec.h:54
irept::id
const irep_idt & id() const
Definition:
irep.h:388
sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >::read
const dt & read() const
Definition:
irep.h:240
typet
The type of an expression, extends irept.
Definition:
type.h:29
cpp_storage_spec.h
type.h
Defines typet, type_with_subtypet and type_with_subtypest.
to_type_with_subtypes
const type_with_subtypest & to_type_with_subtypes(const typet &type)
Definition:
type.h:252
src
cpp
cpp_storage_spec.cpp
Generated by
1.9.1