From: whitequark Date: Mon, 7 Dec 2020 08:23:32 +0000 (+0000) Subject: bugpoint: accept quoted strings in -grep. X-Git-Tag: working-ls180~171^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1135a88dd24b294c41f8964cfc425d938e3dbee;p=yosys.git bugpoint: accept quoted strings in -grep. --- diff --git a/passes/cmds/bugpoint.cc b/passes/cmds/bugpoint.cc index d32d33560..8197b21f7 100644 --- a/passes/cmds/bugpoint.cc +++ b/passes/cmds/bugpoint.cc @@ -45,7 +45,7 @@ struct BugpointPass : public Pass { log(" -yosys \n"); log(" use this Yosys binary. if not specified, `yosys` is used.\n"); log("\n"); - log(" -grep \n"); + log(" -grep \"\"\n"); log(" only consider crashes that place this string in the log file.\n"); log("\n"); log(" -fast\n"); @@ -102,6 +102,9 @@ struct BugpointPass : public Pass { if (grep.empty()) return true; + if (grep.size() > 2 && grep.front() == '"' && grep.back() == '"') + grep = grep.substr(1, grep.size() - 2); + std::ifstream f("bugpoint-case.log"); while (!f.eof()) {