CBMC
padding.cpp File Reference

C++ Language Type Checking. More...

#include "padding.h"
#include <algorithm>
#include <util/arith_tools.h>
#include <util/c_types.h>
#include <util/config.h>
#include <util/namespace.h>
#include <util/pointer_offset_size.h>
#include <util/simplify_expr.h>
+ Include dependency graph for padding.cpp:

Go to the source code of this file.

Functions

mp_integer alignment (const typet &type, const namespacet &ns)
 
static std::optional< 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)
 

Detailed Description

C++ Language Type Checking.

Definition in file padding.cpp.

Function Documentation

◆ add_padding() [1/2]

void add_padding ( struct_typet type,
const namespacet ns 
)

Definition at line 459 of file padding.cpp.

◆ add_padding() [2/2]

void add_padding ( union_typet type,
const namespacet ns 
)

Definition at line 468 of file padding.cpp.

◆ add_padding_gcc()

static void add_padding_gcc ( struct_typet type,
const namespacet ns 
)
static

Definition at line 286 of file padding.cpp.

◆ add_padding_msvc()

static void add_padding_msvc ( struct_typet type,
const namespacet ns 
)
static

Definition at line 170 of file padding.cpp.

◆ alignment()

mp_integer alignment ( const typet type,
const namespacet ns 
)

Definition at line 23 of file padding.cpp.

◆ pad()

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

Definition at line 154 of file padding.cpp.

◆ pad_bit_field()

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

Definition at line 137 of file padding.cpp.

◆ underlying_width()

static std::optional<std::size_t> underlying_width ( const c_bit_field_typet type,
const namespacet ns 
)
static

Definition at line 105 of file padding.cpp.