write_verilog: fix precondition check.
authorwhitequark <whitequark@whitequark.org>
Tue, 14 Apr 2020 12:12:50 +0000 (12:12 +0000)
committerwhitequark <whitequark@whitequark.org>
Tue, 14 Apr 2020 12:12:50 +0000 (12:12 +0000)
backends/verilog/verilog_backend.cc

index 5467e250b5467d34bf2e6556b1cc62af8c4d0b7f..11b2ae10f27c6645debfcea0215dd38653c8ae0e 100644 (file)
@@ -1984,7 +1984,7 @@ struct VerilogBackend : public Backend {
                extra_args(f, filename, args, argidx);
                if (extmem)
                {
-                       if (filename.empty())
+                       if (filename == "<stdout>")
                                log_cmd_error("Option -extmem must be used with a filename.\n");
                        extmem_prefix = filename.substr(0, filename.rfind('.'));
                }