Apply 'make format'

This commit is contained in:
github action 2022-11-20 15:26:23 +00:00
parent 47253450a4
commit a60e273c29
3 changed files with 10 additions and 10 deletions

View File

@ -214,8 +214,7 @@ class CMakeEmitter final {
<< hblockp->modp()->name() << " DIRECTORY "
<< v3Global.opt.makeDir() + "/" + prefix << " SOURCES ";
for (const auto& childr : children) {
*of << " "
<< v3Global.opt.makeDir() + "/" + childr->hierWrapper(true);
*of << " " << v3Global.opt.makeDir() + "/" + childr->hierWrapper(true);
}
*of << " ";
const string vFile = hblockp->vFileIfNecessary();
@ -233,8 +232,7 @@ class CMakeEmitter final {
<< v3Global.rootp()->topModulep()->name() << " DIRECTORY "
<< v3Global.opt.makeDir() << " SOURCES ";
for (const auto& itr : *planp) {
*of << " "
<< v3Global.opt.makeDir() + "/" + itr.second->hierWrapper(true);
*of << " " << v3Global.opt.makeDir() + "/" + itr.second->hierWrapper(true);
}
*of << " " << cmake_list(v3Global.opt.vFiles());
*of << " VERILATOR_ARGS ";

View File

@ -117,7 +117,8 @@ string VString::quoteStringLiteralForShell(const string& str) {
}
string VString::escapeStringForPath(const string& str) {
if (str.find(R"(\\)") != string::npos) return str; // if it has been escaped already, don't do it again
if (str.find(R"(\\)") != string::npos)
return str; // if it has been escaped already, don't do it again
if (str.find('/') != string::npos) return str; // can be replaced by `__MINGW32__` or `_WIN32`
string result;
const char space = ' '; // escape space like this `Program Files`

View File

@ -102,7 +102,8 @@ public:
// e.g. input abc's becomes "\"abc\'s\""
static string escapeStringForPath(const string& str);
// Escape path in Windows
// e.g. input `C:\Program Files\My Program\My Program.exe` becomes `C:\\Program\ Files\\My\ Program\\My\ Program.exe`
// e.g. input `C:\Program Files\My Program\My Program.exe` becomes
// `C:\\Program\ Files\\My\ Program\\My\ Program.exe`
static string quoteStringLiteralForShell(const string& str);
// Replace any unprintable with space
// This includes removing tabs, so column tracking is correct