Skip to content

Commit

Permalink
Remove unused SplitAndAdd function
Browse files Browse the repository at this point in the history
  • Loading branch information
ob committed Jun 5, 2018
1 parent b3f06cc commit aa46a1c
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions tools/osx/crosstool/wrapped_clang.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,26 +118,6 @@ void RunSubProcess(const std::vector<std::string> &args) {
}
}

// Splits txt on the first whitespace delimiter, pushing both substring into strs.
// This is because the wrapped_clang binary is called with arguments like:
// wrapped_clang '-isysroot a/path/that might have/spaces' and we need to
// preserve the path but split the flag and value.
void SplitAndAdd(const std::string &txt, std::vector<std::string> &strs) {
if (txt[0] != '-') {
// not a flag, so no need to split anything.
strs.push_back(txt);
return;
}
auto first_space = txt.find(' ');
auto first = txt.substr(0, first_space);
strs.push_back(first);
if (first_space == std::string::npos) {
return;
}
auto second = txt.substr(first_space+1, std::string::npos);
strs.push_back(second);
}

// Finds and replaces all instances of oldsub with newsub, in-place on str.
void FindAndReplace(const std::string &oldsub, const std::string &newsub,
std::string *str) {
Expand Down

0 comments on commit aa46a1c

Please sign in to comment.