mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-05 03:36:43 +00:00
[llvm-cov] Move a check into a helper method (NFC)
llvm-svn: 274025
This commit is contained in:
parent
625baccb69
commit
eb92c94b10
@ -37,6 +37,9 @@ struct CoverageViewOptions {
|
||||
raw_ostream::Colors Color) const {
|
||||
return llvm::colored_ostream(OS, Color, Colors);
|
||||
}
|
||||
|
||||
/// \brief Check if an output directory has been specified.
|
||||
bool hasOutputDirectory() const { return ShowOutputDirectory != ""; }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ Expected<SourceCoverageView::OwnedStream>
|
||||
SourceCoverageView::createOutputStream(const CoverageViewOptions &Opts,
|
||||
StringRef Path, StringRef Extension,
|
||||
bool InToplevel) {
|
||||
if (Opts.ShowOutputDirectory == "")
|
||||
if (!Opts.hasOutputDirectory())
|
||||
return OwnedStream(&outs());
|
||||
|
||||
return createFileInDirectory(Opts.ShowOutputDirectory,
|
||||
|
Loading…
x
Reference in New Issue
Block a user