From b1135a88dd24b294c41f8964cfc425d938e3dbee Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 7 Dec 2020 08:23:32 +0000 Subject: [PATCH] bugpoint: accept quoted strings in -grep. --- passes/cmds/bugpoint.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()) { -- 2.30.2