22 const std::string &pattern,
23 const char *header_file,
26 std::istringstream hdr(header_file);
28 while(std::getline(hdr, line))
31 if(
has_prefix(line,
"//") || line.find(pattern) == std::string::npos)
43 const std::ostringstream &s,
47 std::istringstream in(s.str());
77 symbol_tablet::symbolst::const_iterator s_it=
78 new_symbol_table.
symbols.find(identifier);
80 if(s_it==new_symbol_table.
symbols.end())
83 message.
error() <<
"failed to produce built-in symbol `" 89 symbol_table.
add(s_it->second);
103 const std::string pattern=
' '+
id2string(identifier)+
'(';
105 std::ostringstream s;
113 return convert(identifier, s, symbol_table, mh);
119 return convert(identifier, s, symbol_table, mh);
126 return convert(identifier, s, symbol_table, mh);
133 return convert(identifier, s, symbol_table, mh);
143 return convert(identifier, s, symbol_table, mh);
146 return convert(identifier, s, symbol_table, mh);
149 return convert(identifier, s, symbol_table, mh);
152 return convert(identifier, s, symbol_table, mh);
155 return convert(identifier, s, symbol_table, mh);
158 return convert(identifier, s, symbol_table, mh);
161 return convert(identifier, s, symbol_table, mh);
168 return convert(identifier, s, symbol_table, mh);
171 return convert(identifier, s, symbol_table, mh);
174 return convert(identifier, s, symbol_table, mh);
177 return convert(identifier, s, symbol_table, mh);
185 return convert(identifier, s, symbol_table, mh);
195 return convert(identifier, s, symbol_table, mh);
202 return convert(identifier, s, symbol_table, mh);
struct configt::ansi_ct ansi_c
const std::string & id2string(const irep_idt &d)
bool ansi_c_typecheck(ansi_c_parse_treet &ansi_c_parse_tree, symbol_tablet &symbol_table, const std::string &module, message_handlert &message_handler)
ansi_c_parse_treet parse_tree
const char gcc_builtin_headers_ia32_3[]
const char gcc_builtin_headers_ubsan[]
ANSI-C Language Type Checking.
std::string strip_string(const std::string &s)
Remove all whitespace characters from either end of a string.
static mstreamt & eom(mstreamt &m)
const char arm_builtin_headers[]
void ansi_c_internal_additions(std::string &code)
const char cw_builtin_headers[]
const char gcc_builtin_headers_omp[]
bool builtin_factory(const irep_idt &identifier, symbol_tablet &symbol_table, message_handlert &mh)
Check whether given identifier is a compiler built-in.
const char gcc_builtin_headers_mips[]
virtual bool parse() override
void set_file(const irep_idt &file)
const char cprover_builtin_headers[]
bool has_prefix(const std::string &s, const std::string &prefix)
const char gcc_builtin_headers_generic[]
const char windows_builtin_headers[]
const char gcc_builtin_headers_tm[]
void ansi_c_scanner_init()
static bool convert(const irep_idt &identifier, const std::ostringstream &s, symbol_tablet &symbol_table, message_handlert &message_handler)
virtual void set_message_handler(message_handlert &_message_handler)
const char gcc_builtin_headers_mem_string[]
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
const char gcc_builtin_headers_ia32_4[]
const char clang_builtin_headers[]
const char gcc_builtin_headers_math[]
ansi_c_parsert ansi_c_parser
const char gcc_builtin_headers_ia32[]
static bool find_pattern(const std::string &pattern, const char *header_file, std::ostream &out)
bool add(const symbolt &symbol)
Add a new symbol to the symbol table.
const char gcc_builtin_headers_arm[]
goto_programt coverage_criteriont message_handlert & message_handler
const char gcc_builtin_headers_ia32_2[]
virtual void clear() override
const char gcc_builtin_headers_power[]