Added "check -assert"

This commit is contained in:
Clifford Wolf 2015-02-22 13:00:41 +01:00
parent 39d25b212c
commit e8307cefd9
1 changed files with 8 additions and 0 deletions

View File

@ -49,6 +49,7 @@ struct CheckPass : public Pass {
{
int counter = 0;
bool noinit = false;
bool assert_mode = false;
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++) {
@ -56,6 +57,10 @@ struct CheckPass : public Pass {
noinit = true;
continue;
}
if (args[argidx] == "-assert") {
assert_mode = true;
continue;
}
break;
}
extra_args(args, argidx, design);
@ -137,6 +142,9 @@ struct CheckPass : public Pass {
}
log("found and reported %d problems.\n", counter);
if (assert_mode)
log_error("Found %d problems in 'check -assert'.\n", counter);
}
} CheckPass;