mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-12 09:03:27 +00:00
liberty: Error when a read liberty file has no nodes
This commit is contained in:
parent
5101b9fcba
commit
418e795235
1 changed files with 11 additions and 0 deletions
|
@ -176,6 +176,14 @@ namespace Yosys
|
||||||
LibertyParser(std::istream &f) : f(f), line(1) {
|
LibertyParser(std::istream &f) : f(f), line(1) {
|
||||||
shared_ast.reset(parse());
|
shared_ast.reset(parse());
|
||||||
ast = shared_ast.get();
|
ast = shared_ast.get();
|
||||||
|
if (!ast) {
|
||||||
|
#ifdef FILTERLIB
|
||||||
|
fprintf(stderr, "No entries found in liberty file.\n");
|
||||||
|
exit(1);
|
||||||
|
#else
|
||||||
|
log_error("No entries found in liberty file.\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef FILTERLIB
|
#ifndef FILTERLIB
|
||||||
|
@ -186,6 +194,9 @@ namespace Yosys
|
||||||
LibertyAstCache::instance.parsed_ast(fname, shared_ast);
|
LibertyAstCache::instance.parsed_ast(fname, shared_ast);
|
||||||
}
|
}
|
||||||
ast = shared_ast.get();
|
ast = shared_ast.get();
|
||||||
|
if (!ast) {
|
||||||
|
log_error("No entries found in liberty file `%s'.\n", fname.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue