cprover
|
C++ Language Type Checking. More...
#include "padding.h"
#include <algorithm>
#include <util/config.h>
#include <util/pointer_offset_size.h>
#include <util/simplify_expr.h>
#include <util/arith_tools.h>
Go to the source code of this file.
Functions | |
mp_integer | alignment (const typet &type, const namespacet &ns) |
static optionalt< std::size_t > | underlying_width (const c_bit_field_typet &type, const namespacet &ns) |
static struct_typet::componentst::iterator | pad_bit_field (struct_typet::componentst &components, struct_typet::componentst::iterator where, std::size_t pad_bits) |
static struct_typet::componentst::iterator | pad (struct_typet::componentst &components, struct_typet::componentst::iterator where, std::size_t pad_bits) |
static void | add_padding_msvc (struct_typet &type, const namespacet &ns) |
static void | add_padding_gcc (struct_typet &type, const namespacet &ns) |
void | add_padding (struct_typet &type, const namespacet &ns) |
void | add_padding (union_typet &type, const namespacet &ns) |
C++ Language Type Checking.
Definition in file padding.cpp.
void add_padding | ( | struct_typet & | type, |
const namespacet & | ns | ||
) |
Definition at line 428 of file padding.cpp.
References add_padding_gcc(), add_padding_msvc(), configt::ansi_c, config, configt::ansi_ct::mode, and configt::ansi_ct::VISUAL_STUDIO.
Referenced by c_typecheck_baset::typecheck_compound_body().
void add_padding | ( | union_typet & | type, |
const namespacet & | ns | ||
) |
Definition at line 437 of file padding.cpp.
References alignment(), configt::ansi_c, configt::ansi_ct::char_width, struct_union_typet::components(), config, irept::get_bool(), integer2size_t(), configt::ansi_ct::mode, pointer_offset_bits(), struct_union_typet::componentt::set_is_padding(), struct_union_typet::componentt::set_name(), to_c_bit_field_type(), exprt::type(), underlying_width(), and configt::ansi_ct::VISUAL_STUDIO.
|
static |
Definition at line 272 of file padding.cpp.
References alignment(), configt::ansi_ct::alignment, configt::ansi_c, configt::ansi_ct::char_width, struct_union_typet::components(), config, DATA_INVARIANT, irept::find(), namespace_baset::follow(), irept::get_bool(), bitvector_typet::get_width(), irept::id(), integer2size_t(), irept::is_nil(), irept::is_not_nil(), pad(), pad_bit_field(), pointer_offset_size(), simplify(), to_c_bit_field_type(), and to_integer().
Referenced by add_padding().
|
static |
Definition at line 172 of file padding.cpp.
References alignment(), configt::ansi_c, configt::ansi_ct::char_width, struct_union_typet::components(), config, irept::get_bool(), integer2size_t(), pad(), pad_bit_field(), pointer_offset_size(), to_c_bit_field_type(), and underlying_width().
Referenced by add_padding().
mp_integer alignment | ( | const typet & | type, |
const namespacet & | ns | ||
) |
Definition at line 21 of file padding.cpp.
References alignment(), struct_union_typet::components(), irept::find(), namespace_baset::follow(), namespace_baset::follow_tag(), irept::get_bool(), irept::id(), irept::is_nil(), pointer_offset_size(), typet::subtype(), to_c_enum_tag_type(), to_integer(), to_struct_tag_type(), to_struct_union_type(), and to_union_tag_type().
Referenced by add_padding(), add_padding_gcc(), add_padding_msvc(), alignment(), configt::ansi_ct::set_ILP32(), configt::ansi_ct::set_ILP64(), configt::ansi_ct::set_LLP64(), configt::ansi_ct::set_LP32(), configt::ansi_ct::set_LP64(), c_typecheck_baset::typecheck_expr_alignof(), c_typecheck_baset::typecheck_type(), and c_typecheck_baset::typecheck_typedef_type().
|
static |
Definition at line 156 of file padding.cpp.
References struct_union_typet::componentt::set_is_padding(), and to_string().
Referenced by add_padding_gcc(), add_padding_msvc(), and arith_right_shift().
|
static |
Definition at line 139 of file padding.cpp.
References struct_union_typet::componentt::set_is_padding(), and to_string().
Referenced by add_padding_gcc(), and add_padding_msvc().
|
static |
Definition at line 108 of file padding.cpp.
References namespace_baset::follow_tag(), irept::get_size_t(), bitvector_typet::get_width(), irept::id(), typet::subtype(), to_bitvector_type(), and to_c_enum_tag_type().
Referenced by add_padding(), and add_padding_msvc().