diff options
Diffstat (limited to 'src/tools/optimization-options.h')
-rw-r--r-- | src/tools/optimization-options.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/optimization-options.h b/src/tools/optimization-options.h index a07e585bd..9d8259077 100644 --- a/src/tools/optimization-options.h +++ b/src/tools/optimization-options.h @@ -187,12 +187,15 @@ struct OptimizationOptions : public ToolOptions { "in the form KEY@VALUE", Options::Arguments::N, [this](Options*, const std::string& argument) { + std::string key, value; auto colon = argument.find('@'); if (colon == std::string::npos) { - Fatal() << "--pass-arg value must be in the form of KEY@VALUE"; + key = argument; + value = "1"; + } else { + key = argument.substr(0, colon); + value = argument.substr(colon + 1); } - auto key = argument.substr(0, colon); - auto value = argument.substr(colon + 1); passOptions.arguments[key] = value; }); // add passes in registry |