mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-20 21:03:40 +00:00
Consistent use of 'override' for virtual methods in derived classes.
o Not all derived methods were marked 'override', but it is a great feature of C++11 that we should make use of. o While at it: touched header files got a -*- c++ -*- for emacs to provide support for that language. o use YS_OVERRIDE for all override keywords (though we should probably use the plain keyword going forward now that C++11 is established)
This commit is contained in:
parent
323f6f6f60
commit
3aa4484a3c
170 changed files with 414 additions and 416 deletions
|
@ -950,7 +950,7 @@ PRIVATE_NAMESPACE_BEGIN
|
|||
|
||||
struct SelectPass : public Pass {
|
||||
SelectPass() : Pass("select", "modify and view the list of selected objects") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -964,7 +964,7 @@ struct SelectPass : public Pass {
|
|||
log("list of selected objects.\n");
|
||||
log("\n");
|
||||
log("Note that many commands support an optional [selection] argument that can be\n");
|
||||
log("used to override the global selection for the command. The syntax of this\n");
|
||||
log("used to YS_OVERRIDE the global selection for the command. The syntax of this\n");
|
||||
log("optional argument is identical to the syntax of the <selection> argument\n");
|
||||
log("described here.\n");
|
||||
log("\n");
|
||||
|
@ -1167,7 +1167,7 @@ struct SelectPass : public Pass {
|
|||
log(" select */t:SWITCH %%x:+[GATE] */t:SWITCH %%d\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
bool add_mode = false;
|
||||
bool del_mode = false;
|
||||
|
@ -1470,7 +1470,7 @@ struct SelectPass : public Pass {
|
|||
|
||||
struct CdPass : public Pass {
|
||||
CdPass() : Pass("cd", "a shortcut for 'select -module <name>'") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -1496,7 +1496,7 @@ struct CdPass : public Pass {
|
|||
log("This is just a shortcut for 'select -clear'.\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
if (args.size() != 1 && args.size() != 2)
|
||||
log_cmd_error("Invalid number of arguments.\n");
|
||||
|
@ -1578,7 +1578,7 @@ static void log_matches(const char *title, Module *module, T list)
|
|||
|
||||
struct LsPass : public Pass {
|
||||
LsPass() : Pass("ls", "list modules or objects in modules") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -1589,7 +1589,7 @@ struct LsPass : public Pass {
|
|||
log("When an active module is selected, this prints a list of objects in the module.\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
size_t argidx = 1;
|
||||
extra_args(args, argidx, design);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue