mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-12 09:03:27 +00:00
Allow reading of gzipped files when not in NDEBUG
This commit is contained in:
parent
388955031f
commit
761dc6f62a
1 changed files with 2 additions and 1 deletions
|
@ -127,7 +127,8 @@ std::istream* uncompressed(const std::string filename, std::ios_base::openmode m
|
||||||
filename.c_str(), unsigned(magic[2]));
|
filename.c_str(), unsigned(magic[2]));
|
||||||
gzip_istream* s = new gzip_istream();
|
gzip_istream* s = new gzip_istream();
|
||||||
delete f;
|
delete f;
|
||||||
log_assert(s->open(filename.c_str()));
|
bool ok = s->open(filename.c_str());
|
||||||
|
log_assert(ok && "Failed to open gzipped file.\n");
|
||||||
return s;
|
return s;
|
||||||
#else
|
#else
|
||||||
log_cmd_error("File `%s' is a gzip file, but Yosys is compiled without zlib.\n", filename.c_str());
|
log_cmd_error("File `%s' is a gzip file, but Yosys is compiled without zlib.\n", filename.c_str());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue