when possible.
--set-spec-const-default-value "<spec id>:<default value> ..."
Set the default values of the specialization constants with
- <spec id>-<default value> pairs specified in a double-quoted
- string. <spec id>-<default value> pairs must be separated by
+ <spec id>:<default value> pairs specified in a double-quoted
+ string. <spec id>:<default value> pairs must be separated by
blank spaces, and in each pair, spec id and default value must
be separated with colon ':' without any blank spaces in between.
e.g.: --set-spec-const-default-value "1:100 2:400"
auto spec_ids_vals =
opt::SetSpecConstantDefaultValuePass::ParseDefaultValuesString(
argv[argi]);
+ if (!spec_ids_vals) {
+ fprintf(stderr,
+ "error: Invalid argument for "
+ "--set-spec-const-default-value: %s\n",
+ argv[argi]);
+ return 1;
+ }
pass_manager.AddPass<opt::SetSpecConstantDefaultValuePass>(
std::move(*spec_ids_vals));
} else {
fprintf(stderr,
- "error: Expect a string of <spec id>-<default value> pairs.");
+ "error: Expected a string of <spec id>:<default value> pairs.");
return 1;
}
} else if (0 == strcmp(cur_arg, "--freeze-spec-const")) {