mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-12 15:36:40 +00:00
Changed frontend-api from FILE to std::istream
This commit is contained in:
parent
5dce303a2a
commit
19cff41eb4
22 changed files with 116 additions and 89 deletions
|
@ -609,13 +609,14 @@ struct ExtractPass : public Pass {
|
|||
}
|
||||
else
|
||||
{
|
||||
FILE *f = fopen(filename.c_str(), "rt");
|
||||
if (f == NULL) {
|
||||
std::ifstream f;
|
||||
f.open(filename.c_str());
|
||||
if (f.fail()) {
|
||||
delete map;
|
||||
log_cmd_error("Can't open map file `%s'.\n", filename.c_str());
|
||||
}
|
||||
Frontend::frontend_call(map, f, filename, (filename.size() > 3 && filename.substr(filename.size()-3) == ".il") ? "ilang" : "verilog");
|
||||
fclose(f);
|
||||
Frontend::frontend_call(map, &f, filename, (filename.size() > 3 && filename.substr(filename.size()-3) == ".il") ? "ilang" : "verilog");
|
||||
f.close();
|
||||
|
||||
if (filename.size() <= 3 || filename.substr(filename.size()-3) != ".il") {
|
||||
Pass::call(map, "proc");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue