aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-12-07 08:23:32 +0000
committerwhitequark <whitequark@whitequark.org>2020-12-07 08:42:54 +0000
commitb1135a88dd24b294c41f8964cfc425d938e3dbee (patch)
tree7d655be3849f99c51cedc2393076c5af5cfe3b1d /passes
parent75f9e9cb452013c8a07333d486a59c238e1b446f (diff)
downloadyosys-b1135a88dd24b294c41f8964cfc425d938e3dbee.tar.gz
yosys-b1135a88dd24b294c41f8964cfc425d938e3dbee.tar.bz2
yosys-b1135a88dd24b294c41f8964cfc425d938e3dbee.zip
bugpoint: accept quoted strings in -grep.
Diffstat (limited to 'passes')
-rw-r--r--passes/cmds/bugpoint.cc5
1 files changed, 4 insertions, 1 deletions
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 <filename>\n");
log(" use this Yosys binary. if not specified, `yosys` is used.\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("\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())
{