summaryrefslogtreecommitdiff
path: root/passes/techmap/dfflibmap.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-23 15:03:55 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-23 15:03:55 +0200
commit19cff41eb4261b20374058f16807a229af46f304 (patch)
tree10cdd990dfbba21e7851127fca75de4c74cdd274 /passes/techmap/dfflibmap.cc
parent5dce303a2a2c27d50e99856b6f33467798e13020 (diff)
Changed frontend-api from FILE to std::istream
Diffstat (limited to 'passes/techmap/dfflibmap.cc')
-rw-r--r--passes/techmap/dfflibmap.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/passes/techmap/dfflibmap.cc b/passes/techmap/dfflibmap.cc
index 6ce771ac..7e39040c 100644
--- a/passes/techmap/dfflibmap.cc
+++ b/passes/techmap/dfflibmap.cc
@@ -463,11 +463,12 @@ struct DfflibmapPass : public Pass {
if (liberty_file.empty())
log_cmd_error("Missing `-liberty liberty_file' option!\n");
- FILE *f = fopen(liberty_file.c_str(), "r");
- if (f == NULL)
+ std::ifstream f;
+ f.open(liberty_file.c_str());
+ if (f.fail())
log_cmd_error("Can't open liberty file `%s': %s\n", liberty_file.c_str(), strerror(errno));
LibertyParser libparser(f);
- fclose(f);
+ f.close();
find_cell(libparser.ast, "$_DFF_N_", false, false, false, false);
find_cell(libparser.ast, "$_DFF_P_", true, false, false, false);