ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
base_subobject.h
Go to the documentation of this file.
1
#ifndef UTIL_SYMTAB_BASE_SUBOBJECT_H
2
#define UTIL_SYMTAB_BASE_SUBOBJECT_H
3
4
#include <string>
5
#include <string_view>
6
7
// Prefix of the nested base-subobject components the C++ frontend adds to a
8
// derived struct, one per direct base. Inherited member access, up/downcasts
9
// and base ctor/dtor `this` are all routed through these components rather
10
// than through clang-ABI byte offsets. Shared with goto-programs and
11
// goto-symex, which decode the same layout. See esbmc/esbmc#1866, #3894.
12
inline
constexpr
std::string_view
BASE_SUBOBJECT_PREFIX
=
"@base@"
;
13
14
// Component name for a direct base whose class_id is `class_id`. Must agree
15
// between the storage site (get_base_components_methods), the cast handlers
16
// and the destructor chain.
17
inline
std::string
base_subobject_name
(std::string_view class_id)
18
{
19
return
std::string(
BASE_SUBOBJECT_PREFIX
) + std::string(class_id);
20
}
21
22
#endif
base_subobject_name
std::string base_subobject_name(std::string_view class_id)
Definition
base_subobject.h:17
BASE_SUBOBJECT_PREFIX
constexpr std::string_view BASE_SUBOBJECT_PREFIX
Definition
base_subobject.h:12
src
util
symtab
base_subobject.h
Generated by
1.15.0