ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
padding.cpp File Reference

Struct/union padding and alignment computation. More...

#include "padding.h"
#include <algorithm>
#include <util/arith/arith_tools.h>
#include <util/lang/c_types.h>
#include <util/config/config.h>
#include <util/irep/std_expr.h>
#include <util/expr/type_byte_size.h>
#include <util/irep/pad_names.h>
Include dependency graph for padding.cpp:

Functions

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_ext_int_after (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 bool follows_ext_int_padding (struct_typet::componentst::const_iterator where, const struct_typet::componentst &components)
static BigInt capped_alignment (const typet &member, const typet &record, const namespacet &ns)
static void raise_to_explicit_alignment (BigInt &max_alignment, const exprt &alignment)
static void add_padding (struct_typet &type, const namespacet &ns)
static void add_padding (union_typet &type, const namespacet &ns)
void add_padding (typet &type, const namespacet &ns)

Detailed Description

Struct/union padding and alignment computation.

Function Documentation

◆ add_padding() [1/3]

void add_padding ( struct_typet & type,
const namespacet & ns )
static

◆ add_padding() [2/3]

void add_padding ( typet & type,
const namespacet & ns )

◆ add_padding() [3/3]

void add_padding ( union_typet & type,
const namespacet & ns )
static

◆ capped_alignment()

BigInt capped_alignment ( const typet & member,
const typet & record,
const namespacet & ns )
static

◆ follows_ext_int_padding()

bool follows_ext_int_padding ( struct_typet::componentst::const_iterator where,
const struct_typet::componentst & components )
static

◆ pad()

struct_typet::componentst::iterator pad ( struct_typet::componentst & components,
struct_typet::componentst::iterator where,
std::size_t pad_bits )
static

◆ pad_bit_field()

struct_typet::componentst::iterator pad_bit_field ( struct_typet::componentst & components,
struct_typet::componentst::iterator where,
std::size_t pad_bits )
static

◆ pad_ext_int_after()

struct_typet::componentst::iterator pad_ext_int_after ( struct_typet::componentst & components,
struct_typet::componentst::iterator where,
std::size_t pad_bits )
static

◆ raise_to_explicit_alignment()

void raise_to_explicit_alignment ( BigInt & max_alignment,
const exprt & alignment )
static