diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-06-10 12:38:02 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-06-10 12:38:02 +0200 |
commit | af79b4bd9827ec0c8aff284a44e861ab0d0efff1 (patch) | |
tree | 2167c73f67c0c9c8e1f85018f6291586fce5048b /backends/ilang | |
parent | 95e937438f9b85b1f1187703de6b32cfd3809187 (diff) | |
download | yosys-af79b4bd9827ec0c8aff284a44e861ab0d0efff1.tar.gz yosys-af79b4bd9827ec0c8aff284a44e861ab0d0efff1.tar.bz2 yosys-af79b4bd9827ec0c8aff284a44e861ab0d0efff1.zip |
Fixed generation of newlines in "dump" output
Diffstat (limited to 'backends/ilang')
-rw-r--r-- | backends/ilang/ilang_backend.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/backends/ilang/ilang_backend.cc b/backends/ilang/ilang_backend.cc index 9c74e61ca..503164d43 100644 --- a/backends/ilang/ilang_backend.cc +++ b/backends/ilang/ilang_backend.cc @@ -323,10 +323,11 @@ void ILANG_BACKEND::dump_module(FILE *f, std::string indent, const RTLIL::Module void ILANG_BACKEND::dump_design(FILE *f, const RTLIL::Design *design, bool only_selected) { for (auto it = design->modules.begin(); it != design->modules.end(); it++) { - if (it != design->modules.begin() || only_selected) - fprintf(f, "\n"); - if (!only_selected || design->selected(it->second)) + if (!only_selected || design->selected(it->second)) { + if (only_selected) + fprintf(f, "\n"); dump_module(f, "", it->second, design, only_selected); + } } } |