aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-23 13:54:21 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-23 13:54:21 +0200
commit5dce303a2a2c27d50e99856b6f33467798e13020 (patch)
tree4f32f6e720ef5bb063e48c9d5ab6bd8356c6b3d6 /kernel/rtlil.cc
parentfff12c719fc2d61e36e85f27080a4043078b0929 (diff)
downloadyosys-5dce303a2a2c27d50e99856b6f33467798e13020.tar.gz
yosys-5dce303a2a2c27d50e99856b6f33467798e13020.tar.bz2
yosys-5dce303a2a2c27d50e99856b6f33467798e13020.zip
Changed backend-api from FILE to std::ostream
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r--kernel/rtlil.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 22bff7bdb..28a451345 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -412,17 +412,12 @@ namespace {
void error(int linenr)
{
- char *ptr;
- size_t size;
-
- FILE *f = open_memstream(&ptr, &size);
- ILANG_BACKEND::dump_cell(f, " ", cell);
- fputc(0, f);
- fclose(f);
+ std::stringstream buf;
+ ILANG_BACKEND::dump_cell(buf, " ", cell);
log_error("Found error in internal cell %s%s%s (%s) at %s:%d:\n%s",
module ? module->name.c_str() : "", module ? "." : "",
- cell->name.c_str(), cell->type.c_str(), __FILE__, linenr, ptr);
+ cell->name.c_str(), cell->type.c_str(), __FILE__, linenr, buf.str().c_str());
}
int param(const char *name)