aboutsummaryrefslogtreecommitdiffstats
path: root/passes/cmds/design.cc
diff options
context:
space:
mode:
authorMiodrag Milanović <mmicko@gmail.com>2023-01-23 16:24:22 +0100
committerGitHub <noreply@github.com>2023-01-23 16:24:22 +0100
commit245884a1011fe45b00bbb9cacd0111eb014adadf (patch)
treed1bcd1f90dc656bef8409bd5f7a677c8d4e4aa35 /passes/cmds/design.cc
parent9bc9121b9efeeb490ca593f75354457a4e420653 (diff)
parent6574553189fb6ccb5d00a0c043671a625672b3d3 (diff)
downloadyosys-245884a1011fe45b00bbb9cacd0111eb014adadf.tar.gz
yosys-245884a1011fe45b00bbb9cacd0111eb014adadf.tar.bz2
yosys-245884a1011fe45b00bbb9cacd0111eb014adadf.zip
Merge pull request #3629 from YosysHQ/micko/clang_fixes
Fixes for some of clang scan-build detected issues
Diffstat (limited to 'passes/cmds/design.cc')
-rw-r--r--passes/cmds/design.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/passes/cmds/design.cc b/passes/cmds/design.cc
index 169f7cc4a..168d38563 100644
--- a/passes/cmds/design.cc
+++ b/passes/cmds/design.cc
@@ -118,6 +118,9 @@ struct DesignPass : public Pass {
std::string save_name, load_name, as_name, delete_name;
std::vector<RTLIL::Module*> copy_src_modules;
+ if (!design)
+ log_cmd_error("No default design.\n");
+
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
{
@@ -280,7 +283,7 @@ struct DesignPass : public Pass {
done[mod->name] = prefix;
}
- while (!queue.empty())
+ while (!queue.empty() && copy_from_design)
{
pool<Module*> old_queue;
old_queue.swap(queue);