mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-16 13:58:47 +00:00
Rename help_v2 to formatted_help
Also add comments to `help()` and `formatted_help()` to clarify usage.
This commit is contained in:
parent
34c514bf96
commit
68cb02d9f3
|
@ -118,14 +118,14 @@ void Pass::post_execute(Pass::pre_post_exec_state_t state)
|
|||
|
||||
void Pass::help()
|
||||
{
|
||||
if (!help_v2()) {
|
||||
if (!formatted_help()) {
|
||||
log("\n");
|
||||
log("No help message for command `%s'.\n", pass_name.c_str());
|
||||
log("\n");
|
||||
}
|
||||
}
|
||||
|
||||
bool Pass::help_v2()
|
||||
bool Pass::formatted_help()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -827,7 +827,7 @@ struct HelpPass : public Pass {
|
|||
auto experimental_flag = pass->experimental_flag;
|
||||
|
||||
auto cmd_help = PrettyHelp(PrettyHelp::Mode::LISTING);
|
||||
auto has_pretty_help = pass->help_v2();
|
||||
auto has_pretty_help = pass->formatted_help();
|
||||
|
||||
if (!has_pretty_help) {
|
||||
enum PassUsageState {
|
||||
|
|
|
@ -58,8 +58,10 @@ struct Pass
|
|||
source_location location = source_location::current());
|
||||
virtual ~Pass();
|
||||
|
||||
// Makes calls to log() to generate help message
|
||||
virtual void help();
|
||||
virtual bool help_v2();
|
||||
// Uses PrettyHelp::get_current() to produce a more portable formatted help message
|
||||
virtual bool formatted_help();
|
||||
virtual void clear_flags();
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design) = 0;
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ static bool is_triggered_check_cell(RTLIL::Cell * cell)
|
|||
struct ChformalPass : public Pass {
|
||||
ChformalPass() : Pass("chformal", "change formal constraints of the design") {}
|
||||
|
||||
bool help_v2() override {
|
||||
bool formatted_help() override {
|
||||
auto *help = PrettyHelp::get_current();
|
||||
help->set_group("formal");
|
||||
help->usage("chformal [types] [mode] [options] [selection]");
|
||||
|
|
Loading…
Reference in a new issue