in tools/worker/output_file_map.cc [32:53]
static std::string MakeIncrementalOutputPath(std::string path,
bool is_derived) {
auto bin_index = path.find("/bin/");
if (bin_index != std::string::npos) {
if (is_derived) {
path.replace(bin_index, 5, "/bin/_swift_incremental_derived/");
} else {
path.replace(bin_index, 5, "/bin/_swift_incremental/");
}
return path;
}
auto genfiles_index = path.find("/genfiles/");
if (genfiles_index != std::string::npos) {
if (is_derived) {
path.replace(genfiles_index, 10, "/genfiles/_swift_incremental_derived/");
} else {
path.replace(genfiles_index, 10, "/genfiles/_swift_incremental/");
}
return path;
}
return path;
}