[driver] Added a separate Parseable OutputLevel.

This level is selected by -parseable-output. This flag is only accepted by
swiftc, since it does not make sense for any of the interactive modes.
(Currently, this level prints out the same information as Verbose, with a
"Command: " string prepended.)

Additionally, in Compilation::performJobs, set RequiresBufferedOutput to true if
parseable output was requested, since parseable output will require buffered
output.

Part of <rdar://problem/15958329>.

Swift SVN r20872
This commit is contained in:
Connor Wakamo
2014-08-01 01:15:41 +00:00
parent 34af354265
commit e47ded9113
4 changed files with 23 additions and 4 deletions

View File

@@ -215,8 +215,15 @@ std::unique_ptr<Compilation> Driver::buildCompilation(
}
OutputLevel Level = OutputLevel::Normal;
if (TranslatedArgList->hasArg(options::OPT_v))
Level = OutputLevel::Verbose;
if (const Arg *A = ArgList->getLastArg(options::OPT_v,
options::OPT_parseable_output)) {
if (A->getOption().matches(options::OPT_v))
Level = OutputLevel::Verbose;
else if (A->getOption().matches(options::OPT_parseable_output))
Level = OutputLevel::Parseable;
else
llvm_unreachable("Unknown OutputLevel argument!");
}
std::unique_ptr<Compilation> C(new Compilation(*this, TC, Diags, Level,
std::move(ArgList),