21 out <<
" " <<
name <<
'\n';
29 out <<
" static_lifetime";
31 out <<
" thread_local";
59 out <<
" mode=" <<
mode;
63 out <<
" module=" <<
module;
67 out <<
" location: " <<
location <<
'\n';
87 #define SYM_SWAP1(x) x.swap(b.x)
98 #define SYM_SWAP2(x) std::swap(x, b.x)
148 bool criterion_must_hold =
true;
160 criterion_must_hold =
false;
166 criterion_must_hold =
false;
174 const size_t dollar_link_start_pos = unstripped_name.find(
"$link");
176 if(dollar_link_start_pos != std::string::npos)
178 size_t dollar_link_end_pos = dollar_link_start_pos + 5;
179 while(
isdigit(unstripped_name[dollar_link_end_pos]))
181 ++dollar_link_end_pos;
184 const auto stripped_name =
185 unstripped_name.substr(0, dollar_link_start_pos) +
186 unstripped_name.substr(dollar_link_end_pos, std::string::npos);
189 criterion_must_hold =
false;
192 if(criterion_must_hold)
235 return !(*
this == other);
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
const irept & find(const irep_idt &name) const
const irep_idt & id() const
Expression to hold a symbol (variable)
symbol_exprt & with_source_location(source_locationt location) &
Add the source location from location, if it is non-nil.
irep_idt base_name
Base (non-scoped) name.
void swap(symbolt &b)
Swap values between two symbols.
bool operator==(const symbolt &other) const
void show(std::ostream &out) const
Dump the state of a symbol object to a given output stream.
bool is_well_formed() const
Check that a symbol is well formed.
irep_idt module
Name of module the symbol belongs to.
source_locationt location
Source code location of definition of symbol.
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
typet type
Type of symbol.
irep_idt name
The unique identifier.
irep_idt pretty_name
Language-specific display name.
bool operator!=(const symbolt &other) const
exprt value
Initial value of symbol.
irep_idt mode
Language mode.
const std::string & id2string(const irep_idt &d)
API to expression classes.
bool has_suffix(const std::string &s, const std::string &suffix)
std::ostream & operator<<(std::ostream &out, const symbolt &symbol)
Overload of stream operator to work with symbols.