mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 14:13:23 +00:00
Changed backend-api from FILE to std::ostream
This commit is contained in:
parent
fff12c719f
commit
5dce303a2a
16 changed files with 710 additions and 725 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue