Added support for specifying the terminator used by Command::printCommandLine.

This defaults to "\n", so this is NFC for existing clients.

Swift SVN r20848
This commit is contained in:
Connor Wakamo
2014-07-31 21:19:56 +00:00
parent 1b980052b1
commit 6cf30215ae
2 changed files with 6 additions and 5 deletions

View File

@@ -99,10 +99,10 @@ void Command::printArguments(llvm::raw_ostream &os,
[&] { os << ' '; });
}
void Command::printCommandLine(llvm::raw_ostream &os) const {
void Command::printCommandLine(llvm::raw_ostream &os,
StringRef Terminator) const {
escapeAndPrintString(os, Executable);
os << ' ';
printArguments(os, Arguments);
os << '\n';
os << Terminator;
}