mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user