Update passes/silimate/report_fanout.cc

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Advay Singh 2026-04-10 13:01:07 -07:00 committed by GitHub
parent 54bcc49987
commit f8ea10d50c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -226,7 +226,11 @@ struct ReportFanoutPass : public Pass {
for (argidx = 1; argidx < args.size(); argidx++)
{
if (args[argidx] == "-limit" && argidx + 1 < args.size()) {
limit = std::stoi(args[++argidx]);
try {
limit = std::stoi(args[++argidx]);
} catch (...) {
log_cmd_error("Invalid value for -limit: '%s'. Expected an integer.\n", args[argidx].c_str());
}
continue;
}
if (args[argidx] == "-file" && argidx + 1 < args.size()) {