Skip to content

Commit 9b5e470

Browse files
authored
Don't use colons in filenames (#2134)
Windows filenames can't contain colons. Use @ instead for passing arguments to passes.
1 parent 1a3c1a5 commit 9b5e470

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/passes/ExtractFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct ExtractFunction : public Pass {
2727
void run(PassRunner* runner, Module* module) override {
2828
Name name = runner->options.getArgument(
2929
"extract",
30-
"ExtractFunction usage: wasm-opt --pass-arg=extract:FUNCTION_NAME");
30+
"ExtractFunction usage: wasm-opt --pass-arg=extract@FUNCTION_NAME");
3131
std::cerr << "extracting " << name << "\n";
3232
bool found = false;
3333
for (auto& func : module->functions) {

src/tools/optimization-options.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ struct OptimizationOptions : public ToolOptions {
142142
.add("--pass-arg",
143143
"-pa",
144144
"An argument passed along to optimization passes being run. Must be "
145-
"in the form KEY:VALUE",
145+
"in the form KEY@VALUE",
146146
Options::Arguments::N,
147147
[this](Options*, const std::string& argument) {
148-
auto colon = argument.find(':');
148+
auto colon = argument.find('@');
149149
if (colon == std::string::npos) {
150-
Fatal() << "--pass-arg value must be in the form of KEY:VALUE";
150+
Fatal() << "--pass-arg value must be in the form of KEY@VALUE";
151151
}
152152
auto key = argument.substr(0, colon);
153153
auto value = argument.substr(colon + 1);
File renamed without changes.

test/passes/extract-function_pass-arg=extract:foo.wast renamed to test/passes/extract-function_pass-arg=extract@foo.wast

File renamed without changes.

0 commit comments

Comments
 (0)