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) |
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 108 of file padding.cpp.
References alignment(), configt::ansi_ct::alignment, configt::ansi_c, struct_union_typet::components(), config, irept::find(), namespace_baset::follow(), irept::get_bool(), bitvector_typet::get_width(), irept::id(), integer2unsigned(), irept::is_nil(), irept::is_not_nil(), pointer_offset_size(), struct_union_typet::componentt::set_is_padding(), struct_union_typet::componentt::set_name(), bitvector_typet::set_width(), simplify(), to_c_bit_field_type(), to_integer(), and exprt::type().
Referenced by c_typecheck_baset::typecheck_compound_body().
void add_padding | ( | union_typet & | type, |
const namespacet & | ns | ||
) |
Definition at line 304 of file padding.cpp.
References alignment(), struct_union_typet::components(), irept::get_bool(), integer2unsigned(), pointer_offset_bits(), irept::pretty(), struct_union_typet::componentt::set_is_padding(), struct_union_typet::componentt::set_name(), bitvector_typet::set_width(), and exprt::type().
mp_integer alignment | ( | const typet & | type, |
const namespacet & | ns | ||
) |
Definition at line 21 of file padding.cpp.
References alignment(), configt::ansi_c, struct_union_typet::components(), config, irept::find(), namespace_baset::follow(), namespace_baset::follow_tag(), irept::get_bool(), bitvector_typet::get_width(), irept::id(), irept::is_nil(), configt::ansi_ct::pointer_width, typet::subtype(), to_bitvector_type(), to_c_enum_tag_type(), to_integer(), and to_struct_union_type().
Referenced by add_padding(), 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_symbol_type(), and c_typecheck_baset::typecheck_type().