diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-04-29 13:48:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-29 13:48:52 +0200 |
commit | 8fde245ea2fbc999328df410f48269b8705d121b (patch) | |
tree | a81952a90066194e5cbbf23d17cf602d83ee0f10 /kernel/yosys.cc | |
parent | ea0e0722bb42254ac8c63eb41664d9dfb7973aec (diff) | |
parent | 4f15e7f00fa2b073d6df39d4af7171f2a3f07bc9 (diff) | |
download | yosys-8fde245ea2fbc999328df410f48269b8705d121b.tar.gz yosys-8fde245ea2fbc999328df410f48269b8705d121b.tar.bz2 yosys-8fde245ea2fbc999328df410f48269b8705d121b.zip |
Merge pull request #967 from olegendo/depfile_esc_spaces
escape spaces with backslash when writing dep file
Diffstat (limited to 'kernel/yosys.cc')
-rw-r--r-- | kernel/yosys.cc | 14 |
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; |