MCPcopy Create free account
hub / github.com/csmith-project/csmith / output_crc_lines

Method output_crc_lines

src/ReducerOutputMgr.cpp:248–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void
249ReducerOutputMgr::output_crc_lines(std::ostream& out)
250{
251 // declare loop variables if they are used in crc lines
252 for (char c = 'i'; c <= 'z'; c++) {
253 string pattern = string("; ") + c + "++)";
254 if (reducer->crc_lines.find(pattern) != string::npos) {
255 output_tab(out, 1);
256 out << "int " << c << " = 0;" << endl;
257 }
258 }
259 if (reducer->crc_lines.find("print_hash_value") != string::npos) {
260 output_tab(out, 1);
261 out << "int print_hash_value = 0;" << endl;
262 }
263 // print the real CRC lines
264 output_tab(out, 1);
265 out << reducer->crc_lines << endl;
266}
267
268int
269ReducerOutputMgr::output_main_func(std::ostream& out)

Callers

nothing calls this directly

Calls 1

output_tabFunction · 0.85

Tested by

no test coverage detected