in tools/worker/swift_runner.cc [349:378]
std::vector<std::string> SwiftRunner::ParseArguments(Iterator itr) {
std::vector<std::string> out_args;
for (auto it = itr.begin(); it != itr.end(); ++it) {
auto arg = *it;
out_args.push_back(arg);
if (StripPrefix("-Xwrapped-swift=", arg)) {
if (StripPrefix("-global-index-store-import-path=", arg)) {
global_index_store_import_path_ = arg;
} else if (StripPrefix("-generated-header-rewriter=", arg)) {
generated_header_rewriter_path_ = arg;
}
} else {
if (arg == "-output-file-map") {
++it;
arg = *it;
output_file_map_path_ = arg;
out_args.push_back(arg);
} else if (arg == "-index-store-path") {
++it;
arg = *it;
index_store_path_ = arg;
out_args.push_back(arg);
} else if (arg == "-dump-ast") {
is_dump_ast_ = true;
}
}
}
return out_args;
}