23 const std::string &pattern,
24 const char *header_file,
27 std::istringstream hdr(header_file);
29 while(std::getline(hdr, line))
32 if(
has_prefix(line,
"//") || line.find(pattern) == std::string::npos)
44 const std::ostringstream &s,
48 std::istringstream in(s.str());
51 ansi_c_parser.set_file(ID_built_in);
59 ansi_c_parser.cpp98=
false;
60 ansi_c_parser.cpp11=
false;
65 if(ansi_c_parser.parse())
73 ansi_c_parser.parse_tree,
82 symbol_tablet::symbolst::const_iterator s_it=
83 new_symbol_table.
symbols.find(identifier);
85 if(s_it==new_symbol_table.
symbols.end())
88 message.
error() <<
"failed to produce built-in symbol '" << identifier
94 symbol_table.
add(s_it->second);
104 bool support_float16_type,
109 const std::string pattern=
' '+
id2string(identifier)+
'(';
111 std::ostringstream s;
119 return convert(identifier, s, symbol_table, mh);
125 return convert(identifier, s, symbol_table, mh);
132 return convert(identifier, s, symbol_table, mh);
139 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);
164 return convert(identifier, s, symbol_table, mh);
167 return convert(identifier, s, symbol_table, mh);
174 return convert(identifier, s, symbol_table, mh);
177 return convert(identifier, s, symbol_table, mh);
180 return convert(identifier, s, symbol_table, mh);
183 return convert(identifier, s, symbol_table, mh);
186 return convert(identifier, s, symbol_table, mh);
189 return convert(identifier, s, symbol_table, mh);
192 return convert(identifier, s, symbol_table, mh);
195 return convert(identifier, s, symbol_table, mh);
198 return convert(identifier, s, symbol_table, mh);
206 return convert(identifier, s, symbol_table, mh);
216 return convert(identifier, s, symbol_table, mh);
223 return convert(identifier, s, symbol_table, mh);
const char gcc_builtin_headers_ia32_7[]
const char cprover_builtin_headers[]
const char gcc_builtin_headers_ia32[]
const char gcc_builtin_headers_ia32_2[]
const char gcc_builtin_headers_ia32_5[]
const char gcc_builtin_headers_ubsan[]
void ansi_c_internal_additions(std::string &code, bool support_float16_type)
const char windows_builtin_headers[]
const char gcc_builtin_headers_ia32_8[]
const char gcc_builtin_headers_mem_string[]
const char gcc_builtin_headers_ia32_4[]
const char gcc_builtin_headers_generic[]
const char gcc_builtin_headers_tm[]
const char gcc_builtin_headers_ia32_9[]
const char cw_builtin_headers[]
const char gcc_builtin_headers_math[]
const char gcc_builtin_headers_arm[]
const char gcc_builtin_headers_ia32_6[]
const char gcc_builtin_headers_mips[]
const char clang_builtin_headers[]
const char arm_builtin_headers[]
const char gcc_builtin_headers_omp[]
const char gcc_builtin_headers_ia32_3[]
const char gcc_builtin_headers_power[]
void ansi_c_scanner_init(ansi_c_parsert &)
bool ansi_c_typecheck(ansi_c_parse_treet &ansi_c_parse_tree, symbol_table_baset &symbol_table, const std::string &module, message_handlert &message_handler)
ANSI-C Language Type Checking.
static bool convert(const irep_idt &identifier, const std::ostringstream &s, symbol_table_baset &symbol_table, message_handlert &message_handler)
bool builtin_factory(const irep_idt &identifier, bool support_float16_type, symbol_table_baset &symbol_table, message_handlert &mh)
Check whether given identifier is a compiler built-in.
static bool find_pattern(const std::string &pattern, const char *header_file, std::ostream &out)
struct configt::ansi_ct ansi_c
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Class that provides messages with a built-in verbosity 'level'.
The symbol table base class interface.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
bool add(const symbolt &symbol)
Add a new symbol to the symbol table.
bool has_prefix(const std::string &s, const std::string &prefix)
const std::string & id2string(const irep_idt &d)
std::string strip_string(const std::string &s)
Remove all whitespace characters from either end of a string.
bool ts_18661_3_Floatn_types
bool __float128_is_keyword