diff --git a/kernel/register.cc b/kernel/register.cc index ea9376b36..3bdfc1740 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -27,7 +27,6 @@ #include #include #include -#include YOSYS_NAMESPACE_BEGIN @@ -969,9 +968,10 @@ struct HelpPass : public Pass { else if (source_file.find("techlibs/") == 0 || (!has_source && name.find("synth_") == 0)) cmd_help.group = "techlibs"; else if (has_source) { - auto p = std::filesystem::path(source_file); - if (p.has_parent_path()) { - cmd_help.group = string(p.parent_path()); + auto last_slash = source_file.find_last_of('/'); + if (last_slash != string::npos) { + auto parent_path = source_file.substr(0, last_slash); + cmd_help.group = parent_path; } } // implicit !has_source