diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2023-01-23 16:24:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-23 16:24:22 +0100 |
commit | 245884a1011fe45b00bbb9cacd0111eb014adadf (patch) | |
tree | d1bcd1f90dc656bef8409bd5f7a677c8d4e4aa35 /backends/firrtl/firrtl.cc | |
parent | 9bc9121b9efeeb490ca593f75354457a4e420653 (diff) | |
parent | 6574553189fb6ccb5d00a0c043671a625672b3d3 (diff) | |
download | yosys-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 'backends/firrtl/firrtl.cc')
-rw-r--r-- | backends/firrtl/firrtl.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/firrtl/firrtl.cc b/backends/firrtl/firrtl.cc index e483117d1..d68c52563 100644 --- a/backends/firrtl/firrtl.cc +++ b/backends/firrtl/firrtl.cc @@ -1238,6 +1238,9 @@ struct FirrtlBackend : public Backend { if (top == nullptr) top = last; + if (!top) + log_cmd_error("There is no top module in this design!\n"); + std::string circuitFileinfo = getFileinfo(top); *f << stringf("circuit %s: %s\n", make_id(top->name), circuitFileinfo.c_str()); |