bugpoint: accept quoted strings in -grep.

This commit is contained in:
whitequark 2020-12-07 08:23:32 +00:00
parent 75f9e9cb45
commit b1135a88dd
1 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,7 @@ struct BugpointPass : public Pass {
log(" -yosys <filename>\n"); log(" -yosys <filename>\n");
log(" use this Yosys binary. if not specified, `yosys` is used.\n"); log(" use this Yosys binary. if not specified, `yosys` is used.\n");
log("\n"); log("\n");
log(" -grep <string>\n"); log(" -grep \"<string>\"\n");
log(" only consider crashes that place this string in the log file.\n"); log(" only consider crashes that place this string in the log file.\n");
log("\n"); log("\n");
log(" -fast\n"); log(" -fast\n");
@ -102,6 +102,9 @@ struct BugpointPass : public Pass {
if (grep.empty()) if (grep.empty())
return true; return true;
if (grep.size() > 2 && grep.front() == '"' && grep.back() == '"')
grep = grep.substr(1, grep.size() - 2);
std::ifstream f("bugpoint-case.log"); std::ifstream f("bugpoint-case.log");
while (!f.eof()) while (!f.eof())
{ {