diff options
author | whitequark <whitequark@whitequark.org> | 2020-06-17 19:27:47 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2020-06-17 19:27:47 +0000 |
commit | 3c4e974d7b05d69c620ed76b8a23b461bf99eee6 (patch) | |
tree | 4255818a6eee6a4a796866c0bac92e5babf778eb | |
parent | 334ec5fa0a90b1816060c67bff72362cbd6483c7 (diff) | |
download | yosys-3c4e974d7b05d69c620ed76b8a23b461bf99eee6.tar.gz yosys-3c4e974d7b05d69c620ed76b8a23b461bf99eee6.tar.bz2 yosys-3c4e974d7b05d69c620ed76b8a23b461bf99eee6.zip |
cxxrtl: don't compute vital values in log_assert().
This breaks NDEBUG builds.
Fixes #2166.
-rw-r--r-- | backends/cxxrtl/cxxrtl_backend.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc index 909e1325d..58660fb37 100644 --- a/backends/cxxrtl/cxxrtl_backend.cc +++ b/backends/cxxrtl/cxxrtl_backend.cc @@ -1839,7 +1839,8 @@ struct CxxrtlWorker { topo_design.edge(cell_module, module); } } - log_assert(topo_design.sort()); + bool no_loops = topo_design.sort(); + log_assert(no_loops); modules.insert(modules.end(), topo_design.sorted.begin(), topo_design.sorted.end()); if (split_intf) { |