3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-22 13:53:40 +00:00

Changed backend-api from FILE to std::ostream

This commit is contained in:
Clifford Wolf 2014-08-23 13:54:21 +02:00
parent fff12c719f
commit 5dce303a2a
16 changed files with 710 additions and 725 deletions

View file

@ -747,11 +747,12 @@ struct ExtractPass : public Pass {
}
}
FILE *f = fopen(mine_outfile.c_str(), "wt");
if (f == NULL)
std::ofstream f;
f.open(mine_outfile.c_str(), std::ofstream::trunc);
if (f.fail())
log_error("Can't open output file `%s'.\n", mine_outfile.c_str());
Backend::backend_call(map, f, mine_outfile, "ilang");
fclose(f);
Backend::backend_call(map, &f, mine_outfile, "ilang");
f.close();
}
delete map;