opt_dff: Fix NOT gates wired in reverse.
[yosys.git] / passes / cmds / tee.cc
index ff80f38592cad8d194487c833b4b417c2a9f0373..60689fc825ae6af6ed8932d6ac65e20a34e9ad10 100644 (file)
@@ -27,7 +27,7 @@ PRIVATE_NAMESPACE_BEGIN
 
 struct TeePass : public Pass {
        TeePass() : Pass("tee", "redirect command output to file") { }
-       void help() YS_OVERRIDE
+       void help() override
        {
                //   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
                log("\n");
@@ -37,7 +37,7 @@ struct TeePass : public Pass {
                log("specified logfile(s).\n");
                log("\n");
                log("    -q\n");
-               log("        Do not print output to the normal destination (console and/or log file)\n");
+               log("        Do not print output to the normal destination (console and/or log file).\n");
                log("\n");
                log("    -o logfile\n");
                log("        Write output to this file, truncate if exists.\n");
@@ -46,13 +46,15 @@ struct TeePass : public Pass {
                log("        Write output to this file, append if exists.\n");
                log("\n");
                log("    +INT, -INT\n");
-               log("        Add/subract INT from the -v setting for this command.\n");
+               log("        Add/subtract INT from the -v setting for this command.\n");
                log("\n");
        }
-       void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
+       void execute(std::vector<std::string> args, RTLIL::Design *design) override
        {
                std::vector<FILE*> backup_log_files, files_to_close;
+               std::vector<std::ostream*> backup_log_streams;
                int backup_log_verbose_level = log_verbose_level;
+               backup_log_streams = log_streams;
                backup_log_files = log_files;
 
                size_t argidx;
@@ -60,6 +62,7 @@ struct TeePass : public Pass {
                {
                        if (args[argidx] == "-q" && files_to_close.empty()) {
                                log_files.clear();
+                               log_streams.clear();
                                continue;
                        }
                        if ((args[argidx] == "-o" || args[argidx] == "-a") && argidx+1 < args.size()) {
@@ -89,6 +92,7 @@ struct TeePass : public Pass {
                        for (auto cf : files_to_close)
                                fclose(cf);
                        log_files = backup_log_files;
+                       log_streams = backup_log_streams;
                        throw;
                }
 
@@ -97,6 +101,7 @@ struct TeePass : public Pass {
 
                log_verbose_level = backup_log_verbose_level;
                log_files = backup_log_files;
+               log_streams = backup_log_streams;
        }
 } TeePass;