aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/yosys.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-05-01 16:26:43 -0700
committerEddie Hung <eddie@fpgeh.com>2019-05-01 16:26:43 -0700
commitf86d153cef724af9d30e4139783a7e14d7ba0a19 (patch)
tree1c2cd09407cbeef2f68c19f9bcfb95566355fa01 /kernel/yosys.cc
parentacafcdc94dc148b2bf9c8faef173e5b2b54e1ac5 (diff)
parent7a0af004a0a4dc3831997f0845d40fc3ea514281 (diff)
downloadyosys-f86d153cef724af9d30e4139783a7e14d7ba0a19.tar.gz
yosys-f86d153cef724af9d30e4139783a7e14d7ba0a19.tar.bz2
yosys-f86d153cef724af9d30e4139783a7e14d7ba0a19.zip
Merge branch 'master' of github.com:YosysHQ/yosys
Diffstat (limited to 'kernel/yosys.cc')
-rw-r--r--kernel/yosys.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/yosys.cc b/kernel/yosys.cc
index a12355f1d..20d972150 100644
--- a/kernel/yosys.cc
+++ b/kernel/yosys.cc
@@ -482,6 +482,20 @@ void remove_directory(std::string dirname)
#endif
}
+std::string escape_filename_spaces(const std::string& filename)
+{
+ std::string out;
+ out.reserve(filename.size());
+ for (auto c : filename)
+ {
+ if (c == ' ')
+ out += "\\ ";
+ else
+ out.push_back(c);
+ }
+ return out;
+}
+
int GetSize(RTLIL::Wire *wire)
{
return wire->width;