mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-24 14:53:42 +00:00
Fixes for some of clang scan-build detected issues
This commit is contained in:
parent
956c4e485a
commit
6574553189
15 changed files with 39 additions and 23 deletions
|
@ -1649,7 +1649,7 @@ RTLIL::IdString AstModule::derive(RTLIL::Design *design, const dict<RTLIL::IdStr
|
|||
AstNode *new_ast = NULL;
|
||||
std::string modname = derive_common(design, parameters, &new_ast, quiet);
|
||||
|
||||
if (!design->has(modname)) {
|
||||
if (!design->has(modname) && new_ast) {
|
||||
new_ast->str = modname;
|
||||
process_module(design, new_ast, false, NULL, quiet);
|
||||
design->module(modname)->check();
|
||||
|
@ -1699,6 +1699,7 @@ std::string AST::derived_module_name(std::string stripped_name, const std::vecto
|
|||
std::string AstModule::derive_common(RTLIL::Design *design, const dict<RTLIL::IdString, RTLIL::Const> ¶meters, AstNode **new_ast_out, bool quiet)
|
||||
{
|
||||
std::string stripped_name = name.str();
|
||||
(*new_ast_out) = nullptr;
|
||||
|
||||
if (stripped_name.compare(0, 9, "$abstract") == 0)
|
||||
stripped_name = stripped_name.substr(9);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue